Most Arduino designs have two hardware interrupts (referred to as "interrupt0" and "interrupt1") hard-wired to digital I/O pins 2 and 3, respectively. The Arduino Mega has six hardware interrupts including the additional interrupts ("interrupt2" through "interrupt5") on pins 21, 20, 19, ...
Hardware interrupts are also easier to use in the Arduino environment. You just call the function attachInterrupt and input the interrupt number and the function to call when it triggers. But up until recently, there wasn’t a good Pin Change Interrupt library and even now it isn’t included...
An Arduino Uno (or clone).This is the “brains” of our simple robot. While other Arduino’s would also suffice I’d really recommend you use an Uno so that the sketches I’m presenting will work “as-is”. If you must use a different Arduino you may need to adjust the code to r...
Tested with Arduino IDE v1.8.13 on hardware: Arduino UNO Arduino Nano Arduino Micro Arduino Pro or Pro Mini Arduino Mega or Mega2560 Arduino Leonardo WeMos D1 R2 & mini (ESP8266) Other supported targets: ESP8266 ESP32 SAMD21 STM32F1 ...