OpenSprinkler Forums OpenSprinkler Unified Firmware Flow, Rain, Soil Sensor Inputs, Current Sensor Reply To: Flow, Rain, Soil Sensor Inputs, Current Sensor


Csaba Toth

I have found the solution.
The op_json_names list have to be synchronized with the option list.

Now I have flow, current logs on the SD card, the code part:

ultoa(curr_time, tmp_buffer+strlen(tmp_buffer), 10);
// RAH implementation of flow sensor at the end of all progammed station cycle
strcat_P(tmp_buffer, PSTR(“,”));
#if defined(ARDUINO)
dtostrf(flow_last_gpm,5,2,tmp_buffer+strlen(tmp_buffer)); //the flow log
strcat_P(tmp_buffer, PSTR(“,”));
ultoa(os.read_current(), tmp_buffer+strlen(tmp_buffer), 10); //the current log
sprintf(tmp_buffer+strlen(tmp_buffer), “%5.2f”, flow_last_gpm);
strcat_P(tmp_buffer, PSTR(“]\r\n”));

The log record looks like this:


Program once, station1, 60 seconds, unix time, liter per minute, current milliamper.