Log FuelFlow -Reading 4 frequency inputs (digital on/off) and logging to SD card

Hi Peter H,

I've changed all time variable datatypes to unsigned long and removed the extra curly braces from lines 74 and 110.

Line 131 is changed to HIGH and LOW.

I've also placed line 215 inside the if statement again. However I'm not sure what you mean about line 230. See new skecth.

pgenPreviousMicros has been moved to function as local variable. 1000000UL is used instead of 1000000 in pgenInterval.

I'm not sure what the line 114 dataString statement does..? Is that necessary?

About the micros() in line 132, I'm not really sure how to correct it, I've tried writing a micros() = presentTime; statement and defining presentTime as an unsigned long, but it didn't work for me, so I've left it alone so far.

EDIT: added updated sketch

Fuel_Flow_Logging_to_SD_Card_4_channels.ino (8.26 KB)