tens_esp.ino 991 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. TENS_ESP
  3. *remove UKI references (names etc)
  4. *build OSC commmunication style (cf M_Lavenne)
  5. *use multicast (see udp_multicast2)
  6. *create digipot control functions
  7. *create ID message filtering system using "ESP_NAME"
  8. *add multicast configuration option (0 or 1)
  9. */
  10. #include <Ticker.h>
  11. #include "leds.h" //config and functions relative to leds
  12. #include "ota.h" //config and functions relative to ota firmware updates
  13. #include "wifimgr.h" //config and functions relative to wifi and access point configuration and configuration permanent saving
  14. #include "osc.h" //some helpers functions
  15. #include "AD5242.h" //
  16. void setup ( void ) {
  17. delay(500) ;
  18. Serial.begin(115200);
  19. Serial.println("Starting ESP8266");
  20. setup_AD5242() ;
  21. setupLeds();
  22. setupWifi();
  23. setup_OSC() ;
  24. setupOTA();
  25. blueLedState(-1, 500);
  26. }
  27. void loop ( void ) {
  28. //Serial.println(WiFi.status());
  29. StartConfigAP();
  30. checkOTA();
  31. handle_OSC();
  32. handle_AD5242();
  33. }