This is a nice and informative video! I would just want to add two small corrections: 1. millis() works just fine inside an ISR. It won't increment while the ISR is running, but this is no issue: an ISR should normally run for far less than a millisecond, so you wouldn't expect it to increment anyways. 2. You should not qualify as `volatile` a variables that is local to the ISR: this is only for global variables shared between the ISR and normal code. And in this example, you certainly do *not* want `buttonState` to be stored in SRAM, as doing so only brings inefficiency, with not benefit.
This is a nice and informative video! I would just want to add two small corrections:
1. millis() works just fine inside an ISR. It won't increment while the ISR is running, but this is no issue: an ISR should normally run for far less than a millisecond, so you wouldn't expect it to increment anyways.
2. You should not qualify as `volatile` a variables that is local to the ISR: this is only for global variables shared between the ISR and normal code. And in this example, you certainly do *not* want `buttonState` to be stored in SRAM, as doing so only brings inefficiency, with not benefit.
Have you ever try to use the Bluetooth module HM10??
Thanks. Appreciated your nice explanation.