mbed Sensor node for Instrumented Booth over ETH.

Dependencies:   EthernetInterface-1 MaxbotixDriver Presence HTU21D_TEMP_HUMID_SENSOR_SAMPLE Resources SHARPIR mbed-rtos mbed-src WDT_K64F nsdl_lib

Fork of Trenton_Switch_LPC1768_ETH by Demo Team

sensor_ctl.h

Committer:
andcor02
Date:
2014-12-03
Revision:
25:cb16c5248769
Child:
26:4cac6b346e4f

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_