Attempting to read BME280 sensor from WiPy 2.0 but having trouble ...
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Attempting to read BME280 sensor from WiPy 2.0 but having trouble ...
On a Pyboard, with nothing connected to the I2C bus, scan() returns instantly with []. I think you have some kind of hardware problem. To prove the point, disconnect your hardware and run scan() again.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Attempting to read BME280 sensor from WiPy 2.0 but having trouble ...
Yep, returns immediately if I disconnect everything. Any idea what type of hardware issue this might be?
Re: Attempting to read BME280 sensor from WiPy 2.0 but having trouble ...
So maybe the pull-up resistors on SDA and SCL are missing. You can try to add 4.7 kOhm between SDL and Vcc and SDA and Vcc.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Attempting to read BME280 sensor from WiPy 2.0 but having trouble ...
It is going to be hard for us to debug this remotely: either your hardware is broken or it is wired incorrectly. I'd put a multimeter on the data and clock lines: both should read 3.3V in the idle state. My guess is that one or both is being pulled low.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Attempting to read BME280 sensor from WiPy 2.0 but having trouble ...
With 4 lines, it's hard to imagine it's wired incorrectly. I can try to add pull-ups. I'll also check the voltage levels on SDA & SCL. However I'm late for an appt. so I'm done for the day. I really appreciate your help. I'll be back tomorrow.