[Pytrack] Problem getting an extra I2C sensor working on different bus, pins
-
Hi all,
I have a Pytrack and added a BME280 sensor as follows on the External IO Headers.
VCC - Pin 3
GND - Pin 1
SCL - Pin 7 (P10)
SDA - Pin 8 (P11)My code:
i2c_env = machine.I2C(1, machine.I2C.MASTER, baudrate=400000, pins=('P11', 'P10'))What happens is that the program hangs on this initialization. Probably I misunderstand something with initializing the I2C on a different bus and pins.
Thanks.
-
@marco-den-hartog Have you tried adding external pull-ups on the bus.
-
@xykon Hi. Yes I tried that and also soldering it the SDA to PIN 6 (P9) and SCL to PIN 7 (P10). I am using the WiPy 3.0 with the latest firmware. When initializing it on I2C bus 1 is hangs. When I use bus 2 then the device crashes. Now I have connected the BME280 directly to the configured PINS on the Pytrack for I2C bus 0 and everything runs smoothly.
Looks like there is something not correctly or on the Pytrack board or on the software side. My guess is on the software site because I get some voltage on the pins when using the External IO headers.
-
@marco-den-hartog OK thanks for the update. I will investigate this further tomorrow as I do not have the necessary hardware at home.
You can also try downloading an older firmware here: https://software.pycom.io/downloads/WiPy.html
I'd suggest you try WiPy-1.17.0.b1.tar.gz first and then WiPy-1.16.0.b1.tar.gz
-
@xykon Hi I didnt't told you but have tried 1.16.0.b1 and 1.15.0.1 with both the same results. But with some wires soldered it is working fine.
The following schema now is running:
External IO Header :
PIN 1 - GND
PIN 4 - VCC 3V3 SENSORSHeader(connected a wire underneath the board)
P22 - SDA
P21 - SCLI have now a working demo device for this week :)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login