ESP12F.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. #endif
  37. #ifdef AQUAZOA
  38. char auth[] = "ZxEo9t9IFn2miwSOp10vFvaKd8Imn_UJ"; //70L
  39. #endif
  40. // Your WiFi credentials.
  41. char ssid[] = "Livebox-7C2C";
  42. char pass[] = "566C61F61F9C925C9F3D7D79E6";
  43. /* **************************************************************
  44. * Variable Global
  45. ***************************************************************/
  46. Sortie TabSortie[10];
  47. /* **************************************************************
  48. * Fonction Perso
  49. ***************************************************************/
  50. uint8_t transmit(uint8_t *in, uint8_t nbTr, uint8_t *out);
  51. uint8_t uart_send(uint8_t *in, uint8_t nbTr, uint8_t *out);
  52. void SyncRTC();
  53. void Status();
  54. #endif