Weather control switch for connected day. NXP LPC 1768 module. Ethernet connectivity.

Dependencies:   EthernetInterface mbed-rtos mbed nanoservice_client_1_12

Fork of Trenton_Switch_LPC1768_WIFLY by Demo Team

sensor_ctl.h

Committer:
andcor02
Date:
2014-12-03
Revision:
25:cb16c5248769

File content as of revision 25:cb16c5248769:

#ifndef SENSOR_CTL_H_
#define SENSOR_CTL_H_
/** Defines sensor control functionality for CES Instrumented Booth demonstrations */



/*******  Sensor Timer/Debounce Periods (ms) **********/
#define TEMPERATURE_REPORT_PERIOD   60000       // Every Minute
#define SOUND_SAMPLE_PERIOD           100       // Every 500 ms
#define SOUND_REPORT_PERIOD         10000       // Every 10 seconds
#define DOOR_HEIGHT_PERIOD            100       // Every 100 ms
#define PIR_DEBOUNCE_PERIOD         30000       // 30 seconds
#define KIOSK_DEBOUNCE_PERIOD       60000       // Every minute


//Externally visible values.
extern float    current_temperature_value;
extern float  current_ambient_noise_value;
extern float    current_door_height_value;
extern bool     current_presence_value;         //Either from Kiosk or PIR
extern bool     current_door_trip_value;


//Initialisation
void init_sensors();

//Handle timers/interrupts/etc
void handle_temperature_report_timer();
void handle_microphone_sample_timer();
void handle_microphone_report_timer();
void handle_door_height_sample_timer();

void drive_height();
void drive_kiosk_presence();
void drive_motion();
void drive_door_trip();


//Drive functions





#endif  // SENSOR_CTL_H_