Skip to content

Commit 690e089

Browse files
authored
Merge pull request #7 from adafruit/stemma_i2c
Added commented out board.STEMMA_I2C with explanation
2 parents 7e34b22 + 7952d8b commit 690e089

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

examples/pcf8591_adc_example.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
# normal power and I2C connections. The voltage level should be between 0V/GND and VCC
1515
#
1616
########################################
17-
i2c = board.I2C()
17+
i2c = board.I2C() # uses board.SCL and board.SDA
18+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
1819
pcf = PCF8591(i2c)
1920

2021
channel_a = 0

examples/pcf8591_analog_in.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
#
1919
########################################
2020

21-
i2c = board.I2C()
21+
i2c = board.I2C() # uses board.SCL and board.SDA
22+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
2223
pcf = PCF.PCF8591(i2c)
2324

2425
pcf_in_0 = AnalogIn(pcf, PCF.A0)

examples/pcf8591_dac_example.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
# normal power and I2C connections
1616
#
1717
########################################
18-
i2c = board.I2C()
18+
i2c = board.I2C() # uses board.SCL and board.SDA
19+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
1920

2021
pcf = PCF8591(i2c)
2122
print("enabling DAC")

examples/pcf8591_simpletest.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
# normal power and I2C connections
1919
#
2020
#####################################################################
21-
i2c = board.I2C()
21+
i2c = board.I2C() # uses board.SCL and board.SDA
22+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
2223
pcf = PCF.PCF8591(i2c)
2324

2425
pcf_in_0 = AnalogIn(pcf, PCF.A0)

0 commit comments

Comments
 (0)