Pixl.js I2C not working correctly? I2C Write Error 33281 #4338
Replies: 1 comment
-
Posted at 2024-09-08 by @fanoush Did you try other pins just in case a4,a5 is somehow damaged? unlike stm32 the nrf52 can do hardware I2c on any pins. Posted at 2024-09-08 by user117186 Interesting, did not know that. But no, other pins also have the same issue. Same behaviour with hardware I2C (error Error 33281) and software I2C (weird readings) using different pins. Posted at 2024-09-09 by Ivor How long is the cabling? might be worth adding some external pullup resistors in case the internal nrf ones are too strong. Posted at 2024-09-10 by @gfwilliams I think it might be worth trying to add pullup resistors on the 2 I2C lines and see if that helps? If I remember right I think the NRF52 hardware I2C might not enable internal pullups (I think it was something to do with what Nordic's library does), but the software I2C does enabled them so would work. ... although the nRF52 pullup resistors are something like 40k where they suggest using 10k on I2C I think, so that might explain the instability you're seeing? Posted at 2024-09-13 by user117186 Seems like the instability and incorrect values were caused by bad connections. I soldered it, and now it all works without problems.. Sorry for the ruckus. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2024-09-08 by user117186
Hi.
I'm trying to get a BME280 working using I2C.
I can't seem to get it to work on my Pixl.js
Using the hardware I2C like this:
I'm getting this error
When i try to use software I2C, it kinda works, but only the first measurement and the humidity is wrong.
Thing is, it does work on my Espruino Pico using this code:
This logs the correct humidity, works with hardware I2C and continues to work (in a setInterval for example).
I don't know what to do at this point. Is I2C just broken on (my) pixl.js?
Beta Was this translation helpful? Give feedback.
All reactions