| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #ifndef __ESP12f_H__
- #define __ESP12f_H__
- #include <ESP8266WiFi.h>
- #include <BlynkSimpleEsp8266.h>
- #include <WidgetRTC.h>
- #define SIZEMES 8
- #define ESP_OK 0
- #define ESP_NOK 1
- #define MASKMES 0XF0
- #define MASKERR 0x03
- #define STATUS 0x00
- #define READACTI 0x10
- #define WRITACTI 0x20
- #define READVENT 0x30
- #define WRITVENT 0x40
- #define ERRORR 0x50
- #define RESERVE2 0x60
- #define DELAYBRA 0x70
- #define SYNCRTC 0x80
- #define ACTIREM 0x01
- #define ACTIECU 0x02
- #define ACTICHA 0x04
- #define ACTIBGE 0x08
- #define ACTIBR2 0x10
- #define ACTIBR1 0x20
- #define ACTI0SO 0x40 //osmolation (auto)
- #define ACTINOU 0x80
- #define ACTILUM 0x01
- #define ACTIOSM 0x02 //Osmolation manuel
- #define DECALNOUR 7
- #define DECALOSMO 6
- #define DECALBRA1 5
- #define DECALBRA2 4
- #define DECALBRAG 3
- #define DECALCHAU 2
- #define DECALECUM 1
- #define DECALREME 0
- #define DECALLUM 0
- #define DECALOSMM 1
- /* **************************************************************
- * Structur
- ***************************************************************/
- /* **************************************************************
- * Variable Connection
- ***************************************************************/
- // Token identification
- char auth[] = "Gnqfc0WujzKYuFVFSpOgzy0YqSMyPDaL";
- // Your WiFi credentials.
- char ssid[] = "Livebox-7C2C";
- char pass[] = "566C61F61F9C925C9F3D7D79E6";
- /* **************************************************************
- * Variable Global
- ***************************************************************/
- //BlynkTimer timerRTC;
- BlynkTimer timerStatus;
- BlynkTimer timerRTC;
- WidgetRTC rtc;
- WidgetLED TechBas(V0);
- WidgetLED TechHau(V1);
- WidgetLED CuveHau(V2);
- WidgetLED Reserve(V3);
- /* **************************************************************
- * Fonction Perso
- ***************************************************************/
- void SyncRTC();
- void Status();
- uint8_t transmition(uint8_t *in, uint8_t nbTr, uint8_t *out);
- float convTemp(uint8_t ent);
- float convPH(uint8_t ent);
- int convSalinity(uint8_t ent);
- uint8_t readStatus();
- uint8_t readAction();
- uint8_t readVentil();
- #endif
|