add FSM3.0 src code not impl yet, add header guards and format main

This commit is contained in:
2021-07-07 18:28:05 +02:00
parent f57e875a17
commit 5986beb10c
5 changed files with 24 additions and 24 deletions
+6 -11
View File
@@ -15,7 +15,7 @@ extern "C" {
// BOARD
#define ESP12_LED 2
#define NODEMCU_LED 16
// #define NODEMCU_LED 16
// PWM
#include "treppe.h"
@@ -54,14 +54,15 @@ void setup() {
#else
Serial.begin(76800);
#endif
Serial.println(F("Booting ...."));
//pinMode(NODEMCU_LED, OUTPUT);
Serial.println("Booting ....");
pinMode(ESP12_LED, OUTPUT);
Wire.begin(); // Wire must be started first
Wire.setClock(1000000); // Supported baud rates are 100kHz, 400kHz, and 1000kHz
stairs.setup();
Serial.println("PCA9685 connected !");
//attachInterrupt(digitalPinToInterrupt(2), int_test, RISING);
//attachInterrupt(digitalPinToInterrupt(12), int_test, RISING);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
@@ -82,14 +83,8 @@ void setup() {
httpServer.start();
httpServer.start_apps();
Serial.println("HTTP server started !");
stairs.setup();
Serial.println("PCA9685 connected !");
//attachInterrupt(digitalPinToInterrupt(2), int_test, RISING);
//attachInterrupt(digitalPinToInterrupt(12), int_test, RISING);
os_timer_setfn(&timer1, timerCallback, &timer_flag);
os_timer_arm(&timer1, 20, true);
}