#my keys are stored in abpkeys.py then linked here so I have the same source running Lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.US915) # Please pick the region that matches where you are using the device: Uart.init(9600, bits=8, parity=None, stop=1) # init with given parameters Uart = UART(1, 9600) # init with given baudrate #from machine import I2C, Pin #added for si7021 rh sensorįrom si7021 import SI7021 #added for si7021 rh sensor I don't believe I've got anything in the code to trigger start/stop conditions. Prior, it would fail after the first or second 5 minute wait period. by adding i2c.scan() before that line, the problem 'went away' and ran for 12+ hours until I bricked it doing a firmware OTA update. The typical failure point was ~47 lines from the end of my code. Here's the TI url that told me these low i2c values. My baudrate for i2c was set to what I figured was a low value, 9600. Googling, I found that for 3.3v io, I probably need something between 996r and 1.77k I currently had 4.7k resistors and tried 6.8k resistors. Time between polling the i2c devices was about 5 minutes. I think it said "device not found" or "no response". But if I left the i2c.scan() out, it would fail fairly frequently with an i2c.buffer error. If I did i2c.scan() before I polled the sensors, I was most likely to get good data back. I don't have a working library for the light sensor, but left it plugged in so I could push something out to upgrade capability once I figured it out. One is an si7021 temp/RH/Dewpoint sensor and the other is a TSL2961 light sensor. Each is on a short 4-conductor, 24awg ribbon cable, maybe 6-9 inches in length. I have two devices hooked to I2C on my LoPy4 and was having some odd issues.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |