#include void timer1_callback() { for (int i = 0; i < 16; i++) { pwm_set_state(i, 1); } } ESPMega_Timer timer1(0, 50, timer1_callback, 15001); /* This Code will run right after ESPMega PRO's Peripheral Initialization Routine */ void user_pre_init() { } /* This code will run after every component is initialized */ void user_init() { timer1.begin(); ESPMega_EXTLCD.print("page home"); ESPMega_EXTLCD.write(0xFF); ESPMega_EXTLCD.write(0xFF); ESPMega_EXTLCD.write(0xFF); } /* This code will run once every event loop */ void user_loop() { if(Serial2.available()) { Serial.println(Serial2.read()); } } /* This code will run when an input pin changed state */ void virtual_interrupt_user_callback(int pin, int state) { } void pwm_changed_user_callback(int pin) { } /* This code will run every 15 seconds */ void timer_tick_callback() { if (standalone) { timer1.loop(); } }