Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
609fc9181d | ||
|
|
59d99f9926 | ||
|
|
a0f5ec26d2 | ||
|
|
c95ea1ed22 |
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
<div class="param_block">
|
<div class="param_block">
|
||||||
<input type="button" class="control" data-action="s_oben" value="sensor_oben">
|
<input type="button" class="control" data-action="s_oben" value="sensor_oben">
|
||||||
<input type="button" class="control" data-action="s_unten" value="sensor_unten">
|
<input type="button" class="control" data-action="s_unten" value="sensor_unten">
|
||||||
<input type="button" class="control" data-action="on_off" value="on_off">
|
<!-- <input type="button" class="control" data-action="on_off" value="on_off"> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="param_block">
|
<div class="param_block">
|
||||||
|
|||||||
@@ -355,13 +355,16 @@ void Treppe::setup() {
|
|||||||
// see also lib/PCA9685-Arduin/PCA9685.h:204
|
// see also lib/PCA9685-Arduin/PCA9685.h:204
|
||||||
pwmController.init(PCA9685_PhaseBalancer_None);
|
pwmController.init(PCA9685_PhaseBalancer_None);
|
||||||
// pwmController.init(PCA9685_PhaseBalancer_Linear);
|
// pwmController.init(PCA9685_PhaseBalancer_Linear);
|
||||||
pwmController.setPWMFrequency(100);
|
pwmController.setPWMFrequency(200);
|
||||||
// pwmController.setAllChannelsPWM(idle_pwm);
|
// pwmController.setAllChannelsPWM(idle_pwm);
|
||||||
|
|
||||||
// WARNING: before getting Parameters of Flash, make sure plausible parameters
|
// WARNING: before getting Parameters of Flash, make sure plausible parameters
|
||||||
// are written in flash!
|
// are written in flash!
|
||||||
EEPROM.get(EEP_START_ADDR, param); // get Parameters of flash
|
EEPROM.get(EEP_START_ADDR, param); // get Parameters of flash
|
||||||
param_pend = param;
|
param_pend = param;
|
||||||
|
#ifndef LDR_REGELUNG
|
||||||
|
idle_pwm_ist = param.idle_pwm_max;
|
||||||
|
#endif
|
||||||
|
|
||||||
pinMode(13, OUTPUT);
|
pinMode(13, OUTPUT);
|
||||||
pinMode(0, OUTPUT);
|
pinMode(0, OUTPUT);
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
#include "PCA9685.h"
|
#include "PCA9685.h"
|
||||||
#include <EEPROM.h>
|
#include <EEPROM.h>
|
||||||
|
|
||||||
#define LDR_REGELUNG // comment in to activate LDR control
|
// #define LDR_REGELUNG // comment in to activate LDR control
|
||||||
// #define LDRDEBUG // comment in to show LDR measurement
|
// #define LDRDEBUG // comment in to show LDR measurement
|
||||||
#define LDR_HYS 100 // Hysteresis for switching off FSM [lux]
|
#define LDR_HYS 100 // Hysteresis for switching off FSM [lux]
|
||||||
#define LDR_AVERAGE_SAMPLES 50
|
#define LDR_AVERAGE_SAMPLES 50
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ extern "C" {
|
|||||||
#include "user_interface.h"
|
#include "user_interface.h"
|
||||||
}
|
}
|
||||||
// OTA & WEB
|
// OTA & WEB
|
||||||
|
#include <ESP8266mDNS.h>
|
||||||
#include "httpserver.h"
|
#include "httpserver.h"
|
||||||
#include "ota.h"
|
#include "ota.h"
|
||||||
#include "wifi_credentials.h"
|
#include "wifi_credentials.h"
|
||||||
@@ -106,6 +107,10 @@ void setup() {
|
|||||||
httpServer.start_apps();
|
httpServer.start_apps();
|
||||||
Serial.println("HTTP server started !");
|
Serial.println("HTTP server started !");
|
||||||
|
|
||||||
|
if (MDNS.begin("singleLED")) {
|
||||||
|
Serial.println("MDNS for singleLED started");
|
||||||
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
@@ -113,6 +118,7 @@ void setup() {
|
|||||||
" PW: " + String(wifi_data.PW));
|
" PW: " + String(wifi_data.PW));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
if (inter != 0u) {
|
if (inter != 0u) {
|
||||||
Serial.printf("interrupt\n");
|
Serial.printf("interrupt\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user