diff --git a/examples/testmeter/testmeter.ino b/examples/testmeter/testmeter.ino index 635c058..e646754 100644 --- a/examples/testmeter/testmeter.ino +++ b/examples/testmeter/testmeter.ino @@ -6,22 +6,24 @@ can be adjusted as parameters in the instance creation. https://www.youtube.com/c/jordanrubin6502 2020 - 2022 Jordan Rubin. - */ +*/ #include //required for platformio #include /* - WATERMETER WATERMETER(SignalGPIOpin,useInternalPullupResistor,measure[g|l],metervalue) + WATERMETER WATERMETER(SignalGPIOpin,useInternalPullupResistor,measure[g|l],metervalue,saveInterval) Using GPIO 15 [15] Using internal pullup resistors [true] This meter is designed as gallons [g] Debounce delay in ms [100] - Use SD card to autosave meter to filesys [true] + Use SD card to autosave meter to filesys [true] The value of measurment added each time [.1] i.e. .1 gallons per pulse + The save interval to SD in seconds [30] If SD card is set to true the programme will expect a fat32 formatted SD card installed in the unit. It uses the default connections. SPIFFS hase been completely removed as of this version, given the constant barrage of read and saves to the ESP32 thousands of times over is unhealthy for the device. + The save interval further limits constant writes to the SD card by limiting updates to the interval. CS -> GPIO 5 MOSI -> GPIO 23 @@ -29,7 +31,7 @@ MISO -> GPIO 19 */ -WATERMETER thisMeter(15,true,'g',100,true,.1); +WATERMETER thisMeter(15,true,'g',100,true,.1,30); void setup() { Serial.begin(38400); diff --git a/library.properties b/library.properties index 09dd1db..01e85df 100644 --- a/library.properties +++ b/library.properties @@ -1,9 +1,9 @@ name=Watermeter -version=1.0.5 +version=1.0.6 author=Jordan Rubin maintainer=Jordan Rubin sentence=Control Library for reed switch pulse actuated water meters such as the DAE Water Meter Model V-100P -paragraph=Support includes Gallons/Litres, Debounce adjustment, conversion, and SPIFFS filesystem power off backup support. +paragraph=Support includes Gallons/Litres, Debounce adjustment, conversion, and SD card filesystem power off backup support. category=Device Control url=https://github.com/jordancrubin/watermeter architectures=* diff --git a/src/main.txt b/src/main.txt index 32e0c57..31e1141 100644 --- a/src/main.txt +++ b/src/main.txt @@ -6,22 +6,24 @@ can be adjusted as parameters in the instance creation. https://www.youtube.com/c/jordanrubin6502 2020 - 2022 Jordan Rubin. - */ +*/ #include //required for platformio #include /* - WATERMETER WATERMETER(SignalGPIOpin,useInternalPullupResistor,measure[g|l],metervalue) + WATERMETER WATERMETER(SignalGPIOpin,useInternalPullupResistor,measure[g|l],metervalue,saveInterval) Using GPIO 15 [15] Using internal pullup resistors [true] This meter is designed as gallons [g] Debounce delay in ms [100] - Use SD card to autosave meter to filesys [true] - The value of measurment added each time [.1] i.e. .1 gallons per pulse + Use SD card to autosave meter to filesys [true] + The value of measurment added each time [.1] i.e. .1 gallons per pulse + The save interval to SD in seconds [30] If SD card is set to true the programme will expect a fat32 formatted SD card installed in the unit. It uses the default connections. SPIFFS hase been completely removed as of this version, given the - constant barrage of read and saves to the ESP32 thousands of times over is unhealthy for the device. + constant barrage of read and saves to the ESP32 thousands of times over is unhealthy for the device. + The save interval further limits constant writes to the SD card by limiting updates to the interval. CS -> GPIO 5 MOSI -> GPIO 23 @@ -29,7 +31,7 @@ MISO -> GPIO 19 */ -WATERMETER thisMeter(15,true,'g',100,true,.1); +WATERMETER thisMeter(15,true,'g',100,true,.1,30); void setup() { Serial.begin(38400);