// timer speed (Hz) = Timer clock speed (Mhz) / prescaler
#define LED1 32
#define LED2 34
#include <esp32-hal-timer.h>
hw_timer_t *callback = NULL;
void IRAM_ATTR interrupt() {
delay(10);
}
void setup() {
// put your setup code here, to run once:
// Set prescaler for timer 1
callback = timerBegin(0, 80, true);
timerAttachInterrupt(callback, &interrupt, true);
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}