|
|
|
|
|
|
|
|
|
|
|
|
|
|
os_timer_setfn(&timer1, timerCallback, &timer_flag); |
|
|
os_timer_setfn(&timer1, timerCallback, &timer_flag); |
|
|
os_timer_arm(&timer1, 20, true); |
|
|
os_timer_arm(&timer1, 20, true); |
|
|
|
|
|
|
|
|
//stairs.setState(1); |
|
|
|
|
|
//stairs.setDirection(1); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void loop() { |
|
|
void loop() { |
|
|
/*if(millis() > 25000 && stairs.getState() == 1 && stairs.getDirection() == 1) stairs.setState(0); |
|
|
|
|
|
if(millis() > 45000 && stairs.getDirection() == 1){ |
|
|
|
|
|
stairs.setState(1); |
|
|
|
|
|
stairs.setDirection(0); |
|
|
|
|
|
} |
|
|
|
|
|
*/ |
|
|
|
|
|
TIMEIF_US(ArduinoOTA.handle(), 1000, "OTA"); |
|
|
TIMEIF_US(ArduinoOTA.handle(), 1000, "OTA"); |
|
|
TIMEIF_US(httpServer.handleClient(), 1000, "HTTP"); |
|
|
TIMEIF_US(httpServer.handleClient(), 1000, "HTTP"); |
|
|
} |
|
|
} |