You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a: support multiple sensors - e.g. one at 0x45 and one at 0x44
How do we load the module twice, ideally without duplicating the code. I can see different ways to tackle this, but they might not work
a1: via defines so the module is loaded more than once, but I don't think this will work well with the way the Arduino IDE compiles each cpp, the cpp file isnt "included" like the .h is.
a2: splitting the sensor_SHT85 into something like a library that exists once and something trivial that can be loaded multiple times that calls it (like sensor_SHT85 itself calls the SHT library). But we still have the challenge of how to do this structurally.
UPDATE: Solved by a different method - passing an _ARRAY version of the addresses to sensor_SHT85.cpp this should be extendable to other sensors
c: was able to work with other sensors on the same I2C - i.e. not restarting the Wire.
I think the wires can be supported by splitting the Wire setup into a separate module (system_wire) and only including its header and setup() if any module that needs it is used. (this would happen in _settings.h)
Sensor_SHT85 is tested for a single sensor - my test hardware is a SHT30 shield plugged into an Lolin D1 mini, using its default address of 0x45
It would be a more generically useful module if it could.
This will require some cleverness - some notes below.
The text was updated successfully, but these errors were encountered: