Update user_code.cpp

This commit is contained in:
Siwat Sirichai 2023-09-30 00:56:36 +07:00
parent 576abc1c90
commit 44ccee7903
1 changed files with 8 additions and 7 deletions

View File

@ -1,21 +1,21 @@
#include <user_code.hpp>
void timer1_callback(){
for(int i=0;i<16;i++){
pwm_set_state(i,1);
void timer1_callback()
{
for (int i = 0; i < 16; i++)
{
pwm_set_state(i, 1);
}
}
ESPMega_Timer timer1(0,50,timer1_callback,15001);
ESPMega_Timer timer1(0, 50, timer1_callback, 15001);
/*
This Code will run right after ESPMega PRO's
Peripheral Initialization Routine
*/
void user_pre_init()
{
}
/*
@ -45,7 +45,8 @@ This code will run every 15 seconds
*/
void timer_tick_callback()
{
if(standalone){
if (standalone)
{
timer1.loop();
}
}