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

Committer:
andcor02
Date:
Wed Feb 11 12:36:45 2015 +0000
Revision:
40:b2e9bc654ca1
Parent:
31:389416beb4c3
Child:
41:212121c1a108
Working Set for long distance door

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andcor02 25:cb16c5248769 1 #ifndef SENSOR_CTL_H_
andcor02 25:cb16c5248769 2 #define SENSOR_CTL_H_
andcor02 25:cb16c5248769 3 /** Defines sensor control functionality for CES Instrumented Booth demonstrations */
andcor02 25:cb16c5248769 4
andcor02 25:cb16c5248769 5
andcor02 25:cb16c5248769 6
andcor02 25:cb16c5248769 7 /******* Sensor Timer/Debounce Periods (ms) **********/
erigow01 27:6017a643f386 8 #define TEMPERATURE_REPORT_PERIOD_MS 60000 // Every Minute
erigow01 27:6017a643f386 9 #define SOUND_SAMPLE_PERIOD_MS 100 // Every 500 ms
erigow01 27:6017a643f386 10 #define SOUND_REPORT_PERIOD_MS 10000 // Every 10 seconds
erigow01 31:389416beb4c3 11 #define DOOR_HEIGHT_PERIOD_MS 50 // Every 50 ms
erigow01 27:6017a643f386 12 #define MOTION_REPORT_PERIOD_MS 1000 // Every Second.
erigow01 31:389416beb4c3 13 #define DOOR_TRIP_REPORT_PERIOD_MS 500 // Every half second.
erigow01 27:6017a643f386 14 #define KIOSK_REPORT_PERIOD_MS 1000 // Every Second
andcor02 25:cb16c5248769 15
erigow01 28:908a6f58aa7f 16 #define KIOSK_SENSOR_DEBOUNCE_MS 500
erigow01 28:908a6f58aa7f 17 #define PIR_SENSOR_DEBOUNCE_MS 5000
andcor02 40:b2e9bc654ca1 18 #define DOOR_SENSOR_DEBOUNCE_MS 200
andcor02 25:cb16c5248769 19
erigow01 31:389416beb4c3 20
andcor02 25:cb16c5248769 21 //Externally visible values.
andcor02 25:cb16c5248769 22 extern float current_temperature_value;
andcor02 25:cb16c5248769 23 extern float current_ambient_noise_value;
andcor02 30:b74aa0729b07 24 extern float current_height_value;
andcor02 25:cb16c5248769 25 extern bool current_presence_value; //Either from Kiosk or PIR
andcor02 25:cb16c5248769 26 extern bool current_door_trip_value;
andcor02 25:cb16c5248769 27
andcor02 25:cb16c5248769 28
andcor02 30:b74aa0729b07 29
andcor02 25:cb16c5248769 30 //Initialisation
andcor02 25:cb16c5248769 31 void init_sensors();
andcor02 25:cb16c5248769 32
andcor02 25:cb16c5248769 33 //Handle timers/interrupts/etc
andcor02 25:cb16c5248769 34 void handle_temperature_report_timer();
andcor02 25:cb16c5248769 35 void handle_microphone_sample_timer();
andcor02 25:cb16c5248769 36 void handle_microphone_report_timer();
erigow01 26:4cac6b346e4f 37 void handle_motion_report_timer();
andcor02 25:cb16c5248769 38 void handle_door_height_sample_timer();
erigow01 26:4cac6b346e4f 39 void handle_door_trip_report_timer();
erigow01 27:6017a643f386 40 void handle_kiosk_report_timer();
andcor02 25:cb16c5248769 41
andcor02 25:cb16c5248769 42 #endif // SENSOR_CTL_H_