be80be
Well-Known Member
You have to understand some stuff about arduino if you use serial it's using interrupts too. You need to commit out the serial stuff in main and write some kind of handler if you want to send out something. There a millis library that may work better I used it on led displays it worked better and non blocking delays.
But what you could do is keep a running count of how times pin 2 changes over time so you can send it out to figure timing and send out serially.
Every time your loop runs it sends data out that stops the pin 2 from being read.
But what you could do is keep a running count of how times pin 2 changes over time so you can send it out to figure timing and send out serially.
Every time your loop runs it sends data out that stops the pin 2 from being read.