-
-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Hello all!
I'm working on a Low Power Data Logger and I need to communicate with various SDI-12 sensors without idling the processor. As far as I'm aware, this library cannot wait for a Service Request from a sensor and instead the recommended way is by setting a timer corresponding to the maximum time reported by the sensor or polling the line until a service request is heard. Since some sensors can take minutes to have measurements ready and this Data Logger will be running on a battery charged via solar panel, I can't really afford any of this options. This has lead me to decide to extend the rx ISR for this purpose.
I will be working on this feature the next months, so if anyone has any experience, ideas or information about how to implement this, please do contact me :) For now my idea is to set a awaitingServiceRequest flag and every time the rx ISR builds a character, check if the last 3 characters correspond to a<CR><LF> (a service request) and if so, tell the main loop that this sensor has its measurements ready. This should allow for easier integration of light and deep sleep in the main loop.
Has anyone tried to solve this before?
Please tell me your thoughts!
Simón