|
| 1 | +#define debuggSCK false |
| 2 | +#define decouplerComp true |
| 3 | +#define DataRaw false |
| 4 | + |
| 5 | +#define AWAKE 4 //Despertar WIFI |
| 6 | +#define PANEL A8 //Entrada panel |
| 7 | +#define BAT A7 //Entrada bateria |
| 8 | + |
| 9 | +#define IO0 5 //MICS5525_HEATHER |
| 10 | +#define IO1 13 //MICS2710_HEATHER |
| 11 | +#define IO2 9 //MICS2710_ALTAIMPEDANCIA |
| 12 | +#define IO3 10 //MICS2710_ALTAIMPEDANCIA |
| 13 | +#define FACTORY 7 //factory RESET/AP RN131 |
| 14 | +#define CONTROL 12 //Control Mode |
| 15 | + |
| 16 | +#define S0 A4 //MICS_5525 |
| 17 | +#define S1 A5 //MICS_2710 |
| 18 | +#define S2 A2 //SENS_5525 |
| 19 | +#define S3 A3 //SENS_2710 |
| 20 | +#define S4 A0 //MICRO |
| 21 | +#define S5 A1 //LDR |
| 22 | + |
| 23 | +#define DEFAULT_TIME_UPDATE "30" //Tiempo entre actualizacion y actualizacion |
| 24 | +#define DEFAULT_MIN_UPDATES "1" //Minimo numero de actualizaciones antes de postear |
| 25 | + |
| 26 | +#define POST_MAX 20 //Maximo numero de posteos a la vez |
| 27 | + |
| 28 | +//Direcciones I2C |
| 29 | +#define RTC_ADDRESS 0x68 // Direcion de la RTC |
| 30 | +#define E2PROM 0x50 // Direcion de la EEPROM |
| 31 | + |
| 32 | +#if F_CPU == 8000000 |
| 33 | + #define MCP1 0x2E // Direcion del mcp1 Potenciometros que controlan los MICS |
| 34 | + #define MCP2 0x2F // Direcion del mcp2 Potenciometros que controlan la ganancia del microfono |
| 35 | + #define MCP3 0x2D // Direcion del mcp3 Ajuste carga bateria |
| 36 | + #define bh1730 0x29 // Direcion del sensor de luz |
| 37 | + #define Temperature 0x40 // Direcion del sht21 |
| 38 | + #define ADXL 0x53 //ADXL345 device address |
| 39 | +#else |
| 40 | + #define MCP1 0x2F // Direcion del mcp1 MICS |
| 41 | + #define MCP2 0x2E // Direcion del mcp2 REGULADORES |
| 42 | +#endif |
| 43 | + |
| 44 | +//Espacio reservado para los parametros de configuracion del SCK |
| 45 | +#define EE_ADDR_TIME_VERSION 0 //32BYTES |
| 46 | +#define EE_ADDR_TIME_UPDATE 32 //16BYTES Tiempo entre actualizacion y actualizacion de los sensores en segundos |
| 47 | +#define EE_ADDR_NUMBER_UPDATES 48 //4BYTES Numero de actualizaciones antes de postear |
| 48 | + |
| 49 | + |
| 50 | +#define MICS_5525 0x00 |
| 51 | +#define MICS_2710 0x01 |
| 52 | + |
| 53 | +#define Rc0 10. //Ohm Resistencia medica de corriente en el sensor MICS_5525/MICS_5524 |
| 54 | + |
| 55 | +#if F_CPU == 8000000 |
| 56 | + #define Rc1 39. //Ohm Resistencia medica de corriente en el sensor MICS_2714 |
| 57 | +#else |
| 58 | + #define Rc1 10. //Ohm Resistencia medica de corriente en el sensor MICS_2710 |
| 59 | +#endif |
| 60 | + |
| 61 | +#if F_CPU == 8000000 |
| 62 | + float Vcc = 3300.; //mV |
| 63 | + #define VMIC0 2734. |
| 64 | + #define VMIC1 2734. |
| 65 | +#else |
| 66 | + float Vcc = 5000.; //mV |
| 67 | + #define VMIC0 5000. |
| 68 | + #define VMIC1 2500. |
| 69 | +#endif |
| 70 | + |
| 71 | +#define reference 2560. |
| 72 | + |
| 73 | +#if F_CPU == 8000000 |
| 74 | + #define VAL_MAX_BATTERY 4200 |
| 75 | + #define VAL_MIN_BATTERY 3000 |
| 76 | +#else |
| 77 | + #define VAL_MAX_BATTERY 4050 |
| 78 | + #define VAL_MIN_BATTERY 3000 |
| 79 | +#endif |
| 80 | + |
| 81 | + |
| 82 | +#define DHTLIB_INVALID_VALUE -999 |
| 83 | + |
0 commit comments