
Function Return Value to Variable Error
Hi, I am using a third party sensor (UVTron Flame Sensor) that outputs a number of pulses per second. It's pulses of 100 milliseconds and the value from the sensor during that time is 1. The rest of the time it's 0. So it's basically like a touch sensor.
I have to do different things depending on how many pulses there are per second (there can be 0 to 10 depending on the flame and distance to it). For this, I have to count the number of "tushes" the sensor sends. I wrote some test code, but the problem is in the function. The compiler says that:
numPulse is the name of the function that counts the number of pulses per second. Just in case, the code is this:
I hope you guys can help me. Also, I would think that there would be a function to do this, but I couldn't find it, so if anyone knows it, please tell me.
Thank you.