ESP12F.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #ifndef __ESP12f_H__
  2. #define __ESP12f_H__
  3. #include <ESP8266WiFi.h>
  4. #include <BlynkSimpleEsp8266.h>
  5. #define SIZEMES 8
  6. #define MASKMES 0xF0
  7. #define WRITETABHEU 0x00
  8. #define READTABHEU 0x10
  9. #define WRITETABVAL 0x20
  10. #define READTABVAL 0x30
  11. #define READVENT 0x40
  12. #define WRITVENT 0x50
  13. #define WRITEVALESS 0x60
  14. #define STOP 0x70
  15. #define ESSAI 0x80
  16. #define SYNCRTC 0x90
  17. #define STATUS 0xA0
  18. //#define AQUAGRA
  19. //#define AQUAZOA
  20. /* **************************************************************
  21. * Structur
  22. ***************************************************************/
  23. typedef struct{
  24. uint8_t Max;
  25. uint8_t Pente;
  26. uint16_t HeureDem;
  27. uint16_t HeureArret;
  28. uint8_t Essai;
  29. }Sortie;
  30. /* **************************************************************
  31. * Variable Connection
  32. ***************************************************************/
  33. // Token identification
  34. #ifdef AQUAGRA
  35. char auth[] = "HX49Gzw7ONpiPKKpdRZL8pIYVMPx7GO9"; //220L
  36. #elif AQUAZOA
  37. char auth[] = "ZxEo9t9IFn2miwSOp10vFvaKd8Imn_UJ"; //70L
  38. #endif
  39. // Your WiFi credentials.
  40. char ssid[] = "Livebox-7C2C";
  41. char pass[] = "566C61F61F9C925C9F3D7D79E6";
  42. /* **************************************************************
  43. * Variable Global
  44. ***************************************************************/
  45. Sortie TabSortie[10];
  46. /* **************************************************************
  47. * Fonction Perso
  48. ***************************************************************/
  49. uint8_t transmit(uint8_t *in, uint8_t nbTr, uint8_t *out);
  50. uint8_t uart_send(uint8_t *in, uint8_t nbTr, uint8_t *out);
  51. void SyncRTC();
  52. void Status();
  53. #endif