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:
erigow01
Date:
Wed Dec 03 17:33:34 2014 +0000
Revision:
27:6017a643f386
Parent:
26:4cac6b346e4f
Child:
28:908a6f58aa7f
Integration of kiosk/mic/temp to Eth device complete. Possible bug causes LED to blink and main loop to lock up.

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 27:6017a643f386 11 #define DOOR_HEIGHT_PERIOD_MS 100 // Every 100 ms
erigow01 27:6017a643f386 12 #define MOTION_REPORT_PERIOD_MS 1000 // Every Second.
erigow01 27:6017a643f386 13 #define DOOR_TRIP_REPORT_PERIOD_MS 1000 // Every Second.
erigow01 27:6017a643f386 14 #define KIOSK_REPORT_PERIOD_MS 1000 // Every Second
andcor02 25:cb16c5248769 15
andcor02 25:cb16c5248769 16
andcor02 25:cb16c5248769 17 //Externally visible values.
andcor02 25:cb16c5248769 18 extern float current_temperature_value;
andcor02 25:cb16c5248769 19 extern float current_ambient_noise_value;
andcor02 25:cb16c5248769 20 extern float current_door_height_value;
andcor02 25:cb16c5248769 21 extern bool current_presence_value; //Either from Kiosk or PIR
andcor02 25:cb16c5248769 22 extern bool current_door_trip_value;
andcor02 25:cb16c5248769 23
andcor02 25:cb16c5248769 24
andcor02 25:cb16c5248769 25 //Initialisation
andcor02 25:cb16c5248769 26 void init_sensors();
andcor02 25:cb16c5248769 27
andcor02 25:cb16c5248769 28 //Handle timers/interrupts/etc
andcor02 25:cb16c5248769 29 void handle_temperature_report_timer();
andcor02 25:cb16c5248769 30 void handle_microphone_sample_timer();
andcor02 25:cb16c5248769 31 void handle_microphone_report_timer();
erigow01 26:4cac6b346e4f 32 void handle_motion_report_timer();
andcor02 25:cb16c5248769 33 void handle_door_height_sample_timer();
erigow01 26:4cac6b346e4f 34 void handle_door_trip_report_timer();
erigow01 27:6017a643f386 35 void handle_kiosk_report_timer();
andcor02 25:cb16c5248769 36
andcor02 25:cb16c5248769 37 void drive_height();
andcor02 25:cb16c5248769 38 #endif // SENSOR_CTL_H_