ESP8266 Treppenlichtsteuerung mit OTA zum Firmware Upload
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

doku.md 1.9KB

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