You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_bmp280.py 287B

1234567891011121314151617181920
  1. from machine import Pin,I2C
  2. from bme280 import BME280
  3. D0 = 16
  4. D1 = 5
  5. D2 = 4
  6. D3 = 0
  7. D4 = 2
  8. D5 = 14
  9. D6 = 12
  10. D7 = 13
  11. D8 = 15
  12. # Rouge SCL D1, marron SDA D2
  13. i2c = I2C(scl=Pin(D1),sda=Pin(D2))
  14. print(i2c.scan())
  15. bmp = BME280(i2c=i2c)
  16. print(bmp.values)
  17. print(bmp.values2)