I don't think the rotation is going to be continuous, there is some friction going on, and there isn't a totally perfect fit, the paddle wheel will have some clearance between the walls,
It's pretty hard to really get a linear value, especially from a 3D printed part with no bearings,
I think I'll need to get a code that looks into a wider spectrum?
Let's say that in running condition it's rotating from 10-50 RPMs and then when it decides to stop pumping? Or if any air pockets stops the pump from moving the liquid? The rotation will stop?
Then the sensor will detect that there isn't anything going on and It will sound the alarm?
The only problem is that in some rare cases the magnet maybe stops in the right spot to trigger the hall sensor?
Let's say that the sensor detection zone is 45°
Out of 360° then there is 1 to 8 chance that it will stop in the right spot to trigger the sensor?
So the code also needs a line that's trigger the piezo pwm output if it's a solid high or low,
It depends on what the sensor gives out?
It should be possible to write a code that is universal?
So that the only thing needed is to change the threshold/spectrum value? Let's say active pulse span? Or when the off state is called?
I don't think it's needed to do it by math? Or in any kind of precision?
There will not be any value to actually read?
for an LCD or the serial monitor?
Do you understand what I mean?