moved to treppe.h instead of pwm.h :)

This commit is contained in:
schmidtsi76327 committed 2021-06-25 19:23:02 +02:00
1 parent 69e1e869a5
commit c7eaffda00
5 files changed
+76 -256

No files matched your search

+12 -9
View File
@@ -103,23 +103,26 @@ void setup() {
os_timer_setfn(&timer1, timerCallback, &timer_flag);
os_timer_arm(&timer1, 20, true);
stairs.setState(1);
stairs.setDirection(1);
}
#include <random>
void loop() {
if(stairs.getState() == 0) {
delay(1000);
// if(stairs.getState() == 0) {
// delay(1000);
// uint32_t t = rand() % stairs.getTicks();
// uint32_t d = rand() % 2;
// // uint32_t t = rand() % stairs.getTicks();
// // uint32_t d = rand() % 2;
// stairs.setTick(t);
// stairs.setDirection(d);
// // stairs.setTick(t);
// // stairs.setDirection(d);
stairs.setDirection(!stairs.getDirection());
stairs.setState(1);
}
// stairs.setDirection(!stairs.getDirection());
// stairs.setState(1);
// }
TIMEIF_US(ArduinoOTA.handle(), 10000, "OTA");
TIMEIF_US(httpServer.handleClient(), 10000, "HTTP");