/* Constants.h Defines ATMEGA32U4 pins and other SENSORS and COMUNICATIONS static parameters. */ #define FirmWare "1.5-0.1.0-A" #define TWI_FREQ 100000L //Frecuencia bus I2C /* ARDUINO ports definitions - GPIOS and ADCs */ #define AWAKE 4 // WIFLY AWAKE #define PANEL A8 // PANEL LEVEL #define LEVEL A7 // BAT LEVEL #define IO0 5 // MICS5525_HEATHER #define IO1 13 // MICS2710_HEATHER #define IO2 9 // MICS2710_HIGH_IMPEDANCE #define IO3 10 // MICS2710_HIGH_IMPEDANCE //SHIFT REGISTER CONTROL #define DS 7 // DS 74HC595 #define STCP 4 // STCP 74HC595 #define SHCP 12 // SHCP 74HC595 #define PSEL 0 #define P_WIFI 1 #define GPIO0 2 #define RST_ESP 3 #define CH_PD 4 #define GPIO16 5 #define OTG 6 #define SEL_MUX 7 #define CONTROL 8 // PIN CONTROL S2 #define S0 A4 //MICS_5525 #define S1 A5 //MICS_2710 #define S2 A2 //SENS_5525 #define S3 A3 //SENS_2710 #define S4 A0 //MICRO #define S5 A1 //LDR /* i2c ADDRESSES */ #define RTC_ADDRESS 0x6F // Direction of the RTC #define E2PROM 0x50 // Direction of the EEPROM #define ACCEL 0x1D // Direction of the LSM303D #define CHARGER 0x6B // Direction of the BQ24292 #define POT1 0x51 // Direction of the Potenciometer 1 for MICS heather voltage #define POT2 0x52 // Direction of the Potenciometer 1 for MICS heather voltage #define POT3 0x50 // Direction of the Potenciometer 3 for sensor audio #define si1145 0x60 //#define bh1730 0x29 // Direction of the light sensor #define Temperature 0x40 // Direction of the sht25 #define R1 12 //Kohm #define P1 100 //Kohm