if a brass sensor use the following calculation Liters = (Frequency (Pulses/second) / 7.5) * time elapsed (seconds) / 60 Liters = Q * time elapsed (seconds) / 60 (seconds/minute) ![]() Sensor Frequency (Hz) = 7.5 * Q (Liters/min) if a plastic sensor use the following calculation Lastflowpinstate = digitalRead(FLOWSENSORPIN) do not call the interrupt function COMPA anymore in the middle and call the "Compare A" function above Timer0 is already used for millis() - we'll just interrupt somewhere Interrupt is called once a millisecond, looks for any pulses from the sensor!įlowrate /= lastflowratetimer // in hertz ![]() you can try to keep time of how long it is between pulses which pin to use for reading the sensor? can use any pin! New to libraries and such and hoped someone might give this a look to find out whats needed. Not sure if it will even work as the spec sheet says 5v but wanted to try anyway.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |