I tested my captor with the program of the creator of the captor.
The program have to say open or blocked if the is a signal or not, and it doesn't work at each time. Some signal miss.
How can i know the tinest possibiliy between two signals?
Because, actually, i tested several program of tachymetre and all of them give me sometimes good speed and sometimes the speed is doubled.
For my project, i have to measure the speed of a motor wich i sometimes slow down by touching it (with my hand), and speed it up by realeasing it.
Frequency should between one and 5 hz.
Can you give me advice of sensor?
Here the program:
//what pin are we using?
#define ENDSTOP_PIN 2
//which opto enstop are we using?
//this is for the H21LOB
#define INVERTED 1
//this is for the H21LOI
//#define INVERTED 0
Serial.println("Starting opto endstop exerciser.");