File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 3
3
import busio
4
4
import adafruit_mcp9808
5
5
6
- # This example shows how to get the temperature from a MCP9808 board.
7
- # The object has only one parameter specified so default address (0x18) is used
8
6
i2c_bus = busio .I2C (board .SCL , board .SDA )
7
+
8
+ # To initialise using the default address:
9
9
mcp = adafruit_mcp9808 .MCP9808 (i2c_bus )
10
10
11
- # This second example if for when the address of the module has been changed (eg by connecting A0 to VDD making address=0x19)
12
- # mcp = adafruit_mcp9808.MCP9808(i2c_bus,0x19)
13
- # Object now has two parameters - the new address (0x19) being the second one
11
+ # To initialise using a specified address:
12
+ # Necessary when, for example, connecting A0 to VDD to make address=0x19
13
+ # mcp = adafruit_mcp9808.MCP9808(i2c_bus, 0x19)
14
+
14
15
15
16
16
17
while True :
You can’t perform that action at this time.
0 commit comments