This is a project I’m working on but, I would like to get a specific answer on said project. I want to stay focused on this aspect of the project in thread.
When you use the ISR and and external interrupt for instance
int pin = 13;
volatile int hall = LOW;
attachInterrupt(0, counter , FALLING);
Did I write the attachInterrupt(0, counter , FALLING);? correctly
Where does the ISR go?
I want to count the hall events with hall counter.
Does the external interrupt trigger the ISR?
If it does and I’m using it as a counter and an interrupt happens and goes to increment and the interrupt happens again does it null the first one causing me to miss counts?
After counter gets so high I want the next thing to happen which is stop my motor?
So coult the ISR look like this
If (counter < target);//use counter to go to target number of events
speedo.write(95);// motor controller