ESP12F.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef __ESP12f_H__
  2. #define __ESP12f_H__
  3. #include <ESP8266WiFi.h>
  4. #include <BlynkSimpleEsp8266.h>
  5. #include <WidgetRTC.h>
  6. #define SIZEMES 8
  7. #define MASKMES 0XF0
  8. #define STATUS 0x00
  9. #define READACTI 0x10
  10. #define WRITACTI 0x20
  11. #define READVENT 0x30
  12. #define WRITVENT 0x40
  13. #define ERRORR 0x50
  14. #define RESERVE2 0x60
  15. #define DELAYBRA 0x70
  16. #define SYNCRTC 0x80
  17. #define ACTIREM 0x01
  18. #define ACTIECU 0x02
  19. #define ACTICHA 0x04
  20. #define ACTIBGE 0x08
  21. #define ACTIBR1 0x10
  22. #define ACTIBR2 0x20
  23. #define ACTIOSM 0x40
  24. #define ACTINOU 0x80
  25. /* **************************************************************
  26. * Structur
  27. ***************************************************************/
  28. /* **************************************************************
  29. * Variable Connection
  30. ***************************************************************/
  31. // Token identification
  32. char auth[] = "qDSPfbEHHMiQxMNFeKZ2_lKwbxD81Yu8";
  33. // Your WiFi credentials.
  34. char ssid[] = "Livebox-7C2C";
  35. char pass[] = "566C61F61F9C925C9F3D7D79E6";
  36. /* **************************************************************
  37. * Variable Global
  38. ***************************************************************/
  39. //BlynkTimer timerRTC;
  40. BlynkTimer timerStatus;
  41. WidgetRTC rtc;
  42. WidgetLED TechBas(V0);
  43. WidgetLED TechHau(V1);
  44. WidgetLED CuveHau(V2);
  45. WidgetLED Reserve(V3);
  46. /* **************************************************************
  47. * Fonction Perso
  48. ***************************************************************/
  49. uint8_t uart_send(uint8_t *in, uint8_t nbTr, uint8_t *out); // envoie un message et recoie la reponce
  50. uint8_t transmition(uint8_t *in, uint8_t nbTr, uint8_t *out); // reesai si probleme dans le message;
  51. void SyncRTC();
  52. float convTemp(uint8_t ent);
  53. float convPH(uint8_t ent);
  54. int convSalinity(uint8_t ent);
  55. void Status();
  56. #endif