Counting pulses with Arduino Nano