Hummm... at 1:04 into the video, you state that the Arduino (i.e. ATmega168/328) only supports interrupts on 1 or 2 pins. This is not totally correct. While it does have dedicated Interrupts on 2 pins, which also support type of interrupt (i.e. raising edge/falling edge), ALL the other i/o pins do support "Change" interrupts. They are not quite as easy to configure and used, BUT THEY DO EXIST. :) :) Great video though. I just found your channel. If you look at an Arduino UNO pinout you'll see labels "PCINT0 - PCINT23". These are "Pin Change" interrupt #s. UNFORTUNATELY, Arduino Library for UNO only supports INT0 & INT1. So if you want to use Pin Change interrupts on other pins, it looks like you have to go direct to the AVR Registers... TOO BAD...
Good point! We kept this video to just the hardware interrupts, as handling the PinChange Interrupts can be more awkward as you have to determine which pin caused the interrupt to fire in your ISR, which can become more confusing when supporting a number of devices via interrupt. Some boards (e.g. ESP32) do support interrupts on all pins, so you can have one ISR per pin.
Hummm... at 1:04 into the video, you state that the Arduino (i.e. ATmega168/328) only supports interrupts on 1 or 2 pins. This is not totally correct. While it does have dedicated Interrupts on 2 pins, which also support type of interrupt (i.e. raising edge/falling edge), ALL the other i/o pins do support "Change" interrupts. They are not quite as easy to configure and used, BUT THEY DO EXIST. :) :) Great video though. I just found your channel.
If you look at an Arduino UNO pinout you'll see labels "PCINT0 - PCINT23". These are "Pin Change" interrupt #s. UNFORTUNATELY, Arduino Library for UNO only supports INT0 & INT1. So if you want to use Pin Change interrupts on other pins, it looks like you have to go direct to the AVR Registers... TOO BAD...
Good point! We kept this video to just the hardware interrupts, as handling the PinChange Interrupts can be more awkward as you have to determine which pin caused the interrupt to fire in your ISR, which can become more confusing when supporting a number of devices via interrupt.
Some boards (e.g. ESP32) do support interrupts on all pins, so you can have one ISR per pin.