BME280 tutorial fail library?
Posted: Mon Jan 28, 2019 11:20 pm
Hey,
I am trying to fulfil a tutorial on this site:
https://diyprojects.io/oled-display-ssd ... E-DYMZCe-m
I use an Lolin D32 Pro, the same OLED display and the newest firmware '''esp32spiram-20190125-v1.10.bin'''.
The display works. It is recognised as a I2C device (Scan i2c bus...i2c devices found: 1 60) and BME KO
is blinking all the time.
The BME280 doesn't seem to get recognised by the I2C scan...
I am using this library for the BME280:
https://github.com/loboris/MicroPython_ ... /bme280.py
There are like 5-6 other libraries and I don't know which one to use.
boot.py:
import esp
#esp.osdebug(None)
import machine
import main
machine.main("main.py")
main.py:
import machine, time, ssd1306, bme280
from ssd1306 import SSD1306, SSD1306_I2C
from bme280 import BME280
"""Display"""
pinScl = 22 #ESP8266 GPIO5 (D1)
pinSda = 21 #ESP8266 GPIO4 (D2)
addrOled = 60 #0x3c
addrBME280 = 118 #0x76
hSize = 64 # Hauteur ecran en pixels | display heigh in pixels
wSize = 128 # Largeur ecran en pixels | display width in pixels
oledIsConnected = False
bmeIsConnected = False
temp = 0
pa = 0
hum = 0
# init ic2 object
i2c = machine.I2C(scl=machine.Pin(22), sda=machine.Pin(21)) #ESP8266 5/4
library name: ssd1306.py and bme280.py.
I am trying to fulfil a tutorial on this site:
https://diyprojects.io/oled-display-ssd ... E-DYMZCe-m
I use an Lolin D32 Pro, the same OLED display and the newest firmware '''esp32spiram-20190125-v1.10.bin'''.
The display works. It is recognised as a I2C device (Scan i2c bus...i2c devices found: 1 60) and BME KO
is blinking all the time.
The BME280 doesn't seem to get recognised by the I2C scan...
I am using this library for the BME280:
https://github.com/loboris/MicroPython_ ... /bme280.py
There are like 5-6 other libraries and I don't know which one to use.
boot.py:
import esp
#esp.osdebug(None)
import machine
import main
machine.main("main.py")
main.py:
import machine, time, ssd1306, bme280
from ssd1306 import SSD1306, SSD1306_I2C
from bme280 import BME280
"""Display"""
pinScl = 22 #ESP8266 GPIO5 (D1)
pinSda = 21 #ESP8266 GPIO4 (D2)
addrOled = 60 #0x3c
addrBME280 = 118 #0x76
hSize = 64 # Hauteur ecran en pixels | display heigh in pixels
wSize = 128 # Largeur ecran en pixels | display width in pixels
oledIsConnected = False
bmeIsConnected = False
temp = 0
pa = 0
hum = 0
# init ic2 object
i2c = machine.I2C(scl=machine.Pin(22), sda=machine.Pin(21)) #ESP8266 5/4
library name: ssd1306.py and bme280.py.