I posted something similar on this a while back, but I abandoned the project then. Arrogant as I am, I am back at the project again, which is going (slightly) better. I am building a weatherstation using:
Basically, I have the light sensor and Temp sensor working, but I can't get the pressure board to go
The configuration is:
I keep getting TIMEOUT errors, but the power and ground work for the TSL
Can someone help me!
Pico or Standard board? Did you try the devices separately using the examples provided by espruino.com/Modules?
This is almost certainly because you need pullup resistors on the SDA and SCL data wires. Pretty much all I2C devices need it. Some modules have them pre-installed, but some don't
The I2C timeout is when it's not able to communicate with the module over I2C.
Finally, try adding some 10k pull-up resistors. the Adafruit page doesn't mention that it has them and I think some Arduino boards to have them on so they may have left them off of the adaptor board?
Also, are SDA and SCL actually connected up to the right places? They could have got crossed over.
SDA and SCL are hooked up in the right spots,
It's running on 5v to Vin
I don't have any resistors, so I'll run to the store and pick some up. Would the DHT22 also require those? (It works for me...sometimes, but it's finnicky)
When boards have the resistors, then they usually have a pin or solder jumper to enable them, because only on resistor is needed for each line... (otherwise, the behavior would be dependent on the number of connected devices to a point where either drivers could not fan the load anymore and signals become useless.... like: if too many people hold the rope down or up, no single individual would be able to raise or lower it! Espruino (STM MC) has a pull-down/pull-up option on the pins, but in this case it is too weak for I2C: 30..40K vs 4K7 (even though 4K7 works for most cases, the answer for 'What value the resistor should have?' is not that simple). --- How to get something tested right away until you get your resistors? Do you have some unused GPIO ports left? Configure 2..4 of them as pinMode(,"input_pullup") and connect them to SCL and SDA - of course for each individually - that gives you at least some pulling and may already help... ;-) --- This is not the 'production' solution... but Apollo13 parents still a lot of creativity!
Some error messages get a bit convoluted on bubbling up, especially the uncaught / unexpected ones, because it is expected that under normal circumstances the hardware is properly setup - no offense here, the culprit could just be the well known faulty breadboard contact - and wasting space to bubble up all variations is a waste of space... especially when there is a stack trace available as in Espruino (thank you @Gordon... robust and concise software design and implementation).
I think the DHT22 should be ok without them - it's not I2C. The DHT22 module got updated this week though, so it might be a bit better?
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem