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
Revision 45:d7b4b57574a0, committed 2015-06-29
- Comitter:
- andcor02
- Date:
- Mon Jun 29 09:05:06 2015 +0000
- Parent:
- 44:f70163204018
- Child:
- 46:807e9cf63f4c
- Commit message:
- Changed from RHT03 To HTU21D sensor for Temperature.
Changed in this revision
--- a/EthernetInterface.lib Tue May 12 10:57:33 2015 +0000 +++ b/EthernetInterface.lib Mon Jun 29 09:05:06 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/andcor02/code/EthernetInterface-1/#fb309b990168 +http://developer.mbed.org/users/andcor02/code/EthernetInterface-1/#25174344e17f
--- a/NSDL/nsdl_lib.lib Tue May 12 10:57:33 2015 +0000 +++ b/NSDL/nsdl_lib.lib Mon Jun 29 09:05:06 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/Sensinode/code/nsdl_lib/#388450b1e776 +http://developer.mbed.org/teams/Sensinode/code/nsdl_lib/#8a47d4c71067
--- a/RHT03.lib Tue May 12 10:57:33 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/tristanjph/code/RHT03/#153e20f26d54
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/htu21d.lib Mon Jun 29 09:05:06 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/andcor02/code/HTU21D_TEMP_HUMID_SENSOR_SAMPLE/#396c0b63392e
--- a/mbed-rtos.lib Tue May 12 10:57:33 2015 +0000 +++ b/mbed-rtos.lib Mon Jun 29 09:05:06 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#ab4200083b07 +http://mbed.org/users/mbed_official/code/mbed-rtos/#ef0a22cdf839
--- a/mbed-src.lib Tue May 12 10:57:33 2015 +0000 +++ b/mbed-src.lib Mon Jun 29 09:05:06 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-src/#fc4922e0c183 +http://mbed.org/users/mbed_official/code/mbed-src/#30f9462b5296
--- a/node_cfg.h Tue May 12 10:57:33 2015 +0000 +++ b/node_cfg.h Mon Jun 29 09:05:06 2015 +0000 @@ -9,8 +9,8 @@ //Which Sensors #define NODE_SENSOR_STATION 1 // use K64F platform. Base sensor platform. Includes Microphone, temperature. -#define NODE_HEIGHT_STATION 1 // use K64F platform. This include door height sensor -#define NODE_KIOSK_STATION 0 // use K64F platform. This includes kiosk presence sensor +#define NODE_HEIGHT_STATION 0 // use K64F platform. This include door height sensor +#define NODE_KIOSK_STATION 1 // use K64F platform. This includes kiosk presence sensor #define NODE_DOOR_TRIP_STATION 0 // use K64F platform. This includes door tripwire sensor #define NODE_PIR_STATION 0 // use K64F platform. This includes pir motion sensor @@ -46,13 +46,13 @@ //Ethernet Sensors... #define ENDPOINT_TYPE {"mbed-sensor-Ethernet"} -//#define NODE_NAME "mbed-sensor-demo-1" +#define NODE_NAME "mbed-sensor-demo-1" //#define NODE_NAME "mbed-sensor-demo-2" //#define NODE_NAME "mbed-sensor-demo-3" //#define NODE_NAME "mbed-sensor-demo-4" //#define NODE_NAME "mbed-sensor-demo-5" //#define NODE_NAME "mbed-sensor-demo-6" -#define NODE_NAME "mbed-sensor-stairs" +//#define NODE_NAME "mbed-sensor-stairs" //#define NODE_NAME "mbed-sensor-reception"
--- a/sensor_ctl.cpp Tue May 12 10:57:33 2015 +0000 +++ b/sensor_ctl.cpp Mon Jun 29 09:05:06 2015 +0000 @@ -5,13 +5,13 @@ #include "node_cfg.h" //Sensor Drivers -#include "RHT03.h" +#include "htu21d.h" #include "MAX9814.h" #include "sonar.h" #include "Presence.h" #include "SHARPIR.h" #include "DoorTrip.h" -#include "FXOS8700Q.h" +//#include "FXOS8700Q.h" //Sensor MDS Resources #include "door_trip.h" @@ -24,7 +24,7 @@ //Common Sensors #if NODE_SENSOR_STATION -RHT03 temperature(PTB2); +htu21d temphumid(PTE25, PTE24); //Temp humid sensor || SDA, SCL MAX9814 microphone(PTB3); //Analogue in required. #if NODE_PIR_STATION presence pir(PTB11, false, PIR_SENSOR_DEBOUNCE_MS); //(InterruptPin), for PIR sensor, @@ -93,14 +93,9 @@ //timer handler functions void handle_temperature_report_timer() { - if(temperature.readData() == RHT_ERROR_NONE) { - //Only report valid data... - current_temperature_value = temperature.getTemperatureC(); + current_temperature_value = temphumid.getTemp(); printf("Temperature Sample: %2.2f\r\n", current_temperature_value); temperature_report(); - } else { - printf("Temperature Sampleing Failure\r\n"); - } } void handle_microphone_sample_timer(){