Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core-Wrong-ESP32 Interrupts/ESP32_Interrupts #1

Open
Murugesh-Hobbyist opened this issue Mar 16, 2024 · 0 comments
Open

Core-Wrong-ESP32 Interrupts/ESP32_Interrupts #1

Murugesh-Hobbyist opened this issue Mar 16, 2024 · 0 comments

Comments

@Murugesh-Hobbyist
Copy link

The code u provided uses setup alone which should be under loop.
Please update.

#define pushButton_pin 2
#define LED_pin 1
void IRAM_ATTR toggleLED()
{
digitalWrite(LED_pin, !digitalRead(LED_pin));
}
void setup()
{
pinMode(LED_pin, OUTPUT);
pinMode(pushButton_pin, INPUT_PULLUP);
disableCore0WDT();
}
void loop()
{
attachInterrupt(pushButton_pin, toggleLED, RISING);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant