how to attachinterrupt()
so i was trying to attach a interrupt to a pin(18) on arduino mega 2560 R3 and i wrote this code so i want the cursor to display a character and blink its like a typing system .The interrupt is not given response by the microcontroller i dont see any character blinking also i have double-checked the wiring this is the code -
6 Replies
note i replaced the pushbutton with a jumper wire and just make it high and low from +5V
https://wokwi.com/projects/432368632038042625
works with a led - may be too much in ISR
int18 - Wokwi ESP32, STM32, Arduino Simulator
Run IoT and embedded projects in your browser: ESP32, STM32, Arduino, Pi Pico, and more. No installation required!
hmn will test
With ISR, you use volatile variables and just change a Boolean for the process to occur in the loop.
doing a for loop and a delay will result in drama
Actually i want to just change the currentchar value to the next character in the string so ig i will just keep a track of the currentchar index in that string outside isr
Remember to use volatile on variables changed in ISR
That are used else where.