ESP32 Arduino Timer commands
Posted: Fri Jan 22, 2021 1:46 am
I'm trying to convert a project from Arduino Nano/Uno to ESP32 but I've hit a bit of a brick wall with timers.
I'm trying to find the equivalent commands to Arduino TimerOne but on the ESP32 using either the TimerInterrupt library or just raw code.
Timer1.initialize(period);
Timer1.attachInterrupt(wave);
Timer1.setPeriod(period);
Timer1.stop();
Timer1.restart();
I can find similar for the ESP32 IDF
timer_init(1000);
timer_enable_intr(wave);
timer_pause();
But struggling with the Arduino IDE.
Can anyone help?
I'm trying to find the equivalent commands to Arduino TimerOne but on the ESP32 using either the TimerInterrupt library or just raw code.
Timer1.initialize(period);
Timer1.attachInterrupt(wave);
Timer1.setPeriod(period);
Timer1.stop();
Timer1.restart();
I can find similar for the ESP32 IDF
timer_init(1000);
timer_enable_intr(wave);
timer_pause();
But struggling with the Arduino IDE.
Can anyone help?