ESP8266_Treppenlicht/doku.md

87 lines
1.9 KiB
Markdown
Raw Normal View History

2021-06-21 11:11:24 +00:00
Hardware Timer didnt work https://github.com/khoih-prog/ESP8266TimerInterrupt#why-using-isr-based-hardware-timer-interrupt-is-better
2021-06-21 11:11:24 +00:00
=> Software Timer https://ullisroboterseite.de/esp8266-timing.html#timer
2021-06-22 18:25:27 +00:00
### __Zum aktivieren von GDBStub:__
```c
#include <GDBStub.h>
...
void setup() {
Serial.begin(460800);
gdbstub_init();
```
### __Achtung !__
GDB muss dafür compiled werden
GDB-Version aus Arduino Toolchain hat Support
```sh
$ ./start_xtensa_gdb_stub.sh
2021-06-22 23:30:28 +00:00
```
### __Achtung !__
Don`t forget __\r__
ESP-OTA wird von ufw oder Defender geblockt.
- Windows -> Python needs to be granted with rights
- Linux -> open udp port in ufw ->
```sh
platform.ini
upload_flags =
--host-port <PORT>
...
$ sudo ufw allow tcp/<PORT>
2021-06-23 00:13:48 +00:00
```
```c++
server.streamFile(f, mime::getContentType(SRH::_path), requestMethod);
=====>
const String& p = SRH::_path;
if(p.endsWith(".gzip")) {
server.sendHeader("Content-Encoding", "gzip");
server.streamFile(f, mime::getContentType(p.substring(0, p.length()-5)), requestMethod);
}
else
server.streamFile(f, mime::getContentType(SRH::_path), requestMethod);
2021-06-23 14:49:53 +00:00
```
2021-06-25 09:03:17 +00:00
LED_sequence_v1:
TODO:
- disable led stripes after defined time (webserver paramter?)
- define what to do if people enter stairs from different directions
- CAUTION: Sensor-Deadtime at LEAST 8 seconds
- --> switch off with person leaving stairs might not be possible
2021-06-23 14:49:53 +00:00
Webserver on v0.3.0 now working with LittleFS
TODO:
- check dir for files automatic
- move handleNotFound to httpserver.h
- maybe compress files ?
2021-06-24 14:40:19 +00:00
### LED Flickering issue
2021-06-24 14:40:19 +00:00
https://github.com/NachtRaveVL/PCA9685-Arduino/issues/15
PlatformIO Library veraltet !!
2021-06-24 14:40:19 +00:00
2021-06-25 02:53:06 +00:00
### TIMER in OTA unterbrechen !!!!!
2021-06-25 02:53:06 +00:00
2021-06-27 00:01:25 +00:00
### further improvments
with streamFile gzip encoded Files can be sent
this reduces space on fs !
new easier script needed to just convert to .gz
maybe measure timings on ESP
2021-06-27 00:01:25 +00:00
__=> use serveStatic because way simpler !__