I want to add emergency stop button on my robot and my approach is to use Interrupts on OpenCR to stop motors.
But my problem is that interrupts are triggered randomly.
First I tried with internal pullup resistor and there were a lot of random triggering.
Then, I tried 10k external pull up resistor, it was slightly better but still unusable.
Replaced 10k with 1k pull up resistor. It is noticeable better but still have interrupts every 20-30 minutes.
Motors are off, should not be problem related to EMF.
Tried pins 2 and 3, got same results.
Anyone else experiencing these problems? Any idea how to fix this?