Hello All, i have been trying for the last few hours to write some simple code to read a pulse from a clear path motor.
it outputs 8 pulses per rev.
this is the circuit:
i simply want to count up using the pulses.
i have attempted many sketches but cant seem to get it to work.
i am using an Arduino Nano and digital pin 2 as the input_pullup.
i would post my code but it probably completely wrong.
could someone point me in the right direction?
something like and fill in the blanks:
int counter =0;
void setup() {
Serial.begin (9600);
pinMode(2, INPUT_PULLUP);
void loop(){
Serial.println (counter);
}