Hello, looking to connect a rotary encoder (TTL output) directly to arduino, monitoring one channel.
As motor turns 360 degrees, the state changes for one channel will be 1-0-0, or essentially 1 state change per turn.
How can i record how many state changes have been completed? Does anyone have any sample code i can use?
for example if i want to rotate the motor 50 turns, i will enable the motor, and after 50 turns, another digital output will be triggered which will communicate to a servo controller to STOP the motor.
Thanks
A
As motor turns 360 degrees, the state changes for one channel will be 1-0-0, or essentially 1 state change per turn.
How can i record how many state changes have been completed? Does anyone have any sample code i can use?
for example if i want to rotate the motor 50 turns, i will enable the motor, and after 50 turns, another digital output will be triggered which will communicate to a servo controller to STOP the motor.
Thanks
A