ESP32 Arduino Timer commands

Buleste
Posts: 2
Joined: Fri Jan 22, 2021 1:31 am

ESP32 Arduino Timer commands

Postby Buleste » 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?

lbernstone
Posts: 124
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP32 Arduino Timer commands

Postby lbernstone » Fri Jan 22, 2021 1:47 pm


Buleste
Posts: 2
Joined: Fri Jan 22, 2021 1:31 am

Re: ESP32 Arduino Timer commands

Postby Buleste » Sat Jan 23, 2021 6:36 pm

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 21 guests