diff --git a/include/http/index.html b/include/http/index.html
index cd85bc5..6dbf624 100644
--- a/include/http/index.html
+++ b/include/http/index.html
@@ -23,9 +23,13 @@
-
+
+
+
+
+
diff --git a/src/main.cpp b/src/main.cpp
index 201b3d4..b11b8f5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3,25 +3,29 @@
#include "PCA9685.h"
+#define ESP12_LED 2
+#define NODEMCU_LED 16
+
extern "C" {
#include "user_interface.h"
}
os_timer_t Timer1; // Verwaltungsstruktur des Timers
-uint32_t c;
-
+int c;
+bool toggle = false;
uint32_t m=0;
void timerCallback(void *pArg)
{
*((int *) pArg) += 1;
-
- Serial.print("hallo\n");
- Serial.println(micros()-m);
+ toggle = !toggle;
+ digitalWrite(NODEMCU_LED, toggle);
+
+ Serial.print("[");
+ Serial.print(micros()-m);
+ Serial.print("] timerCallback\n");
m = micros();
-}
+}
-
-// Ă„nderung
// OTA & WEB
#include "wifi_credentials.h"
#include
@@ -162,8 +166,6 @@ void setup_pwm_pca9685() {
pwmController.init(B000000); // Address pins A5-A0 set to B000000
pwmController.setPWMFrequency(200); // Default is 200Hz, supports 24Hz to 1526Hz
- pwmController.setChannelPWM(0, 128 << 4); // Set PWM to 128/255, but in 4096 land
-
Serial.println(pwmController.getChannelPWM(0)); // Should output 2048, which is 128 << 4
}
@@ -171,6 +173,9 @@ void setup() {
Serial.begin(115200);
Serial.println(F("Booting ...."));
+ pinMode(NODEMCU_LED, OUTPUT);
+ pinMode(ESP12_LED, OUTPUT);
+
Wire.begin(); // Wire must be started first
Wire.setClock(400000); // Supported baud rates are 100kHz, 400kHz, and 1000kHz
@@ -183,7 +188,7 @@ void setup() {
ESP.restart();
}
- os_timer_setfn(&Timer1, timerCallback, NULL);
+ os_timer_setfn(&Timer1, timerCallback, &c);
os_timer_arm(&Timer1, 1000, true);
Serial.println("Ready");
@@ -224,7 +229,7 @@ uint8_t softstart_led(uint8_t led, uint16_t startval, uint16_t stopval, uint8_t
return 1;
}
-#define LEDCOUNT 13
+#define LEDCOUNT 16
void ledsequence(uint8_t direction, uint8_t onoff, uint8_t factor){
static int8_t led = 0;