Skip to content

Commit f4d1750

Browse files
reflect i2c bus passing
1 parent e906c4d commit f4d1750

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ If you have any questions, open an issue.
2626
Example:
2727
```python
2828
from bmp180 import BMP180
29-
bmp180 = BMP180()
29+
from machine import I2C, Pin # create an I2C bus object accordingly to the port you are using
30+
bus = I2C(1, I2C.MASTER, baudrate=100000) # on pyboard
31+
# bus = I2C(scl=Pin(4), sda=Pin(5), freq=100000) # on esp8266
32+
bmp180 = BMP180(bus)
3033
bmp180.oversample_sett = 2
3134
bmp180.baseline = 101325
3235

0 commit comments

Comments
 (0)