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?
ESP32 Arduino Timer commands
-
- Posts: 828
- Joined: Mon Jul 22, 2019 3:20 pm
Re: ESP32 Arduino Timer commands
Use the Ticker library.
https://github.com/espressif/arduino-es ... linker.ino
https://github.com/espressif/arduino-es ... linker.ino
Re: ESP32 Arduino Timer commands
I have the ticker library but the documentation on it's usage is sparse at best so I don't know if it will actually do the job I want it to.
Who is online
Users browsing this forum: No registered users and 74 guests