////////////////////////////////////////////////////////////////////////////////////////////////////
//ANDRUINO LIBRARY
//A.Scavuzzo
//www.andruino.it
//DEVICE PAR
//
//DON'T MODIFY THIS FILE!!!!!!!!!
//DON'T MODIFY THIS FILE!!!!!!!!!
//DON'T MODIFY THIS FILE!!!!!!!!!
//DON'T MODIFY THIS FILE!!!!!!!!!
//DON'T MODIFY THIS FILE!!!!!!!!!
////////////////////////////////////////////////////////////////////////////////////////////////////


//#if PIN_USED > MAXPIN
//#error "base_digital_pins_used array can't be over MAXPIN"
//#endif


//NRF24L configuration modules (Nodes)
#define NRF24LMaxDigitalPin 6           //max number of digital ports on remote Arduino sensor with NRF24L
#define NRF24LMaxAnalogPin 5            //max number of analog ports on remote Arduino sensor with NRF24L
#define NRF24LMaxVariable 5             //5=max number of variables  on remote Arduino sensor with NRF24L (don't modify this value)
#define NRF24LMaxModules 10             //don't exceed 10 modules



//************************************************************************************************//
//TEST
//************************************************************************************************//
#define CHECK_HTTP_CONNECTION

//************************************************************************************************//
//DEBUG
//************************************************************************************************//
#if DEBUG_SERIAL_NRF24L == 1
#define IF_SERIAL_DEBUG_NRF(x) ({x;})
#else
#define IF_SERIAL_DEBUG_NRF(x)
#endif
//************************************************************************************************//
//ADC DEFINES
//************************************************************************************************//
#define ADC_MAX 1024


//************************************************************************************************//
//OTHER
//************************************************************************************************//




#define DELAY_TX_ETHERNET 0                                     //0ms for wifi shield transmissions
#define TIMEOUT_RCVDATA 4000                                    //4 sec timeout for the HTTP data receive
#define TIMEOUT_RCVCMD 500                                       //0.5 sec timeout for the HTTP command receive

#define CHECK_LIMITS_EVERY_SEC 3                                    //every 2 seconds check the limits
#define CHECK_LIMITS_NODE_EVERY_SEC 5                               //every 30 seconds check the limits

//sensors
#define CHECK_POWER_CONS_EVERY_SEC 4                               //every 4 seconds check the power consumption
#define CHECK_DALLAS_TEMP_MIN 1                                     //check DALLAS_TEMPERATURE every 1 minute

//http requestes
#define HTTP_SEND_JSON_ACTIVE_REQ_EVERY_SEC 2                      //single query every 2 seconds
#define HTTP_SEND_JSON_NOTACTIVE_REQ_EVERY_SEC 60                  //single query in seconds when iphone is not connected
#define HTTP_SEND_PING_REQ_EVERY_SEC 15                            //ping request seconds



#define TIMEOUT_CLIENT_CONNECTION 5000
#define TIMEOUT_CLIENT_CONNECTION_LONG 10000

#define CONNECTION_FAR_IS 10
