You are reading a single comment by @d0773d and its replies. Click here to read the full conversation.
  • I can successfully read ph, ec and temp sensor readings. Ph and EC are attached to i2c and the temp is attached to analog. I'm using the waveform to gather the analog readings and repeat is set to false so I can manually call the waveform function. Both ph and ec need at least a 3 second pause each in order to get the reading from the sensors.

    I have a boolean named getSensorValues which will be set to true to start the process and remain in that state until all the readings are successfully gathered. The reason for that is, so I can control the readings using a timer, where the timer will continuously loop and trigger a function to start the gathering process if the boolean is set to true and not when it's set to false. And I'm assuming I will need to set the boolean to false during the readings so it won't start another process.

    I will be sending all the values compiled into a JSON string via wifi to a sever and then wait for an "OK" response from the server.

    I hope that makes sense :/

    Anyways, I'm trying to find the duration between sensor readings "sweet spot" where the Pico won't call the individual readings to fast or too slow, sorta like the goldilocks principle.

    So far I need to wait at least 6 seconds(maybe 7 seconds to be safe) for the ec and ph to respond with their readings. I'm not sure about the temp reading using waveform and the wifi duration.

    What do you guys recommend for the durations between readings?

    Also does anyone recommend a better approach to what I'm attempting to do?

About

Avatar for d0773d @d0773d started