I would like to make fuel consumption meter to a boat. (carburettor, so I need to measure only one flow)
I have a starter kit with Arduino UNO, my flow sensor hasn't arrived yet.
Flow sensor gives approximately 2500 pulses per litre.
OK, so the flow is clearly far less than one litre per second, so you are unlikely to need to complicate matters with interrupts (unless you use an LCD :astonished: ). Always preferable not to.
The details you must supply are exactly what you want it to indicate - consumption rate, total consumption, or both, or what else?
Now, how do you want it to indicate? Bar graph? LCD display? Analog meter? Output to computer? Something else? Braille? :grinning:
I have some experience with C-language, but the structure on Arduino IDE with its void setup() and void loop() is kind of restrictive with programming.
At least to me :)
Which means you really do not understand "real time" programming and presumably, were doing something entirely different on a PC.
Most microcontroller applications - and yours is a perfect example - are "turnkey". They start up at power on - that is the "setup()" - and then continuously execute a process which is the "loop()". It is a loop because it never stops. Well, it stops when you turn the power off and you may have to figure out how to deal with that, mainly in saving accumulated data like an odometer.
These two functions are "void" because they never return any result to another function - setup() flows on into the loop() and loop() never stops, so it has no return status.