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

Committer:
andcor02
Date:
Wed Dec 03 09:03:29 2014 +0000
Revision:
25:cb16c5248769
ETH CES

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) **********/
andcor02 25:cb16c5248769 8 #define TEMPERATURE_REPORT_PERIOD 60000 // Every Minute
andcor02 25:cb16c5248769 9 #define SOUND_SAMPLE_PERIOD 100 // Every 500 ms
andcor02 25:cb16c5248769 10 #define SOUND_REPORT_PERIOD 10000 // Every 10 seconds
andcor02 25:cb16c5248769 11 #define DOOR_HEIGHT_PERIOD 100 // Every 100 ms
andcor02 25:cb16c5248769 12 #define PIR_DEBOUNCE_PERIOD 30000 // 30 seconds
andcor02 25:cb16c5248769 13 #define KIOSK_DEBOUNCE_PERIOD 60000 // Every minute
andcor02 25:cb16c5248769 14
andcor02 25:cb16c5248769 15
andcor02 25:cb16c5248769 16 //Externally visible values.
andcor02 25:cb16c5248769 17 extern float current_temperature_value;
andcor02 25:cb16c5248769 18 extern float current_ambient_noise_value;
andcor02 25:cb16c5248769 19 extern float current_door_height_value;
andcor02 25:cb16c5248769 20 extern bool current_presence_value; //Either from Kiosk or PIR
andcor02 25:cb16c5248769 21 extern bool current_door_trip_value;
andcor02 25:cb16c5248769 22
andcor02 25:cb16c5248769 23
andcor02 25:cb16c5248769 24 //Initialisation
andcor02 25:cb16c5248769 25 void init_sensors();
andcor02 25:cb16c5248769 26
andcor02 25:cb16c5248769 27 //Handle timers/interrupts/etc
andcor02 25:cb16c5248769 28 void handle_temperature_report_timer();
andcor02 25:cb16c5248769 29 void handle_microphone_sample_timer();
andcor02 25:cb16c5248769 30 void handle_microphone_report_timer();
andcor02 25:cb16c5248769 31 void handle_door_height_sample_timer();
andcor02 25:cb16c5248769 32
andcor02 25:cb16c5248769 33 void drive_height();
andcor02 25:cb16c5248769 34 void drive_kiosk_presence();
andcor02 25:cb16c5248769 35 void drive_motion();
andcor02 25:cb16c5248769 36 void drive_door_trip();
andcor02 25:cb16c5248769 37
andcor02 25:cb16c5248769 38
andcor02 25:cb16c5248769 39 //Drive functions
andcor02 25:cb16c5248769 40
andcor02 25:cb16c5248769 41
andcor02 25:cb16c5248769 42
andcor02 25:cb16c5248769 43
andcor02 25:cb16c5248769 44
andcor02 25:cb16c5248769 45 #endif // SENSOR_CTL_H_