Add SHT11 CoAP Resource and Activate Sensors for several CoAP Resources.
This commit is contained in:
parent
35b6032c64
commit
fab4f4144f
3 changed files with 128 additions and 2 deletions
|
@ -76,8 +76,23 @@ extern resource_t
|
|||
extern resource_t res_leds, res_toggle;
|
||||
#endif
|
||||
#if PLATFORM_HAS_LIGHT
|
||||
#include "dev/light-sensor.h"
|
||||
extern resource_t res_light;
|
||||
#endif
|
||||
/*
|
||||
#if PLATFORM_HAS_BATTERY
|
||||
#include "dev/battery-sensor.h"
|
||||
extern resource_t res_battery;
|
||||
#endif
|
||||
#if PLATFORM_HAS_RADIO
|
||||
#include "dev/radio-sensor.h"
|
||||
extern resource_t res_radio;
|
||||
#endif
|
||||
#if PLATFORM_HAS_SHT11
|
||||
#include "dev/sht11/sht11-sensor.h"
|
||||
extern resource_t res_sht11;
|
||||
#endif
|
||||
*/
|
||||
|
||||
PROCESS(er_example_server, "Erbium Example Server");
|
||||
AUTOSTART_PROCESSES(&er_example_server);
|
||||
|
@ -123,8 +138,23 @@ PROCESS_THREAD(er_example_server, ev, data)
|
|||
rest_activate_resource(&res_toggle, "actuators/toggle");
|
||||
#endif
|
||||
#if PLATFORM_HAS_LIGHT
|
||||
/* rest_activate_resource(&res_light, "sensors/light"); */
|
||||
rest_activate_resource(&res_light, "sensors/light");
|
||||
SENSORS_ACTIVATE(light_sensor);
|
||||
#endif
|
||||
/*
|
||||
#if PLATFORM_HAS_BATTERY
|
||||
rest_activate_resource(&res_battery, "sensors/battery");
|
||||
SENSORS_ACTIVATE(battery_sensor);
|
||||
#endif
|
||||
#if PLATFORM_HAS_RADIO
|
||||
rest_activate_resource(&res_radio, "sensors/radio");
|
||||
SENSORS_ACTIVATE(radio_sensor);
|
||||
#endif
|
||||
#if PLATFORM_HAS_SHT11
|
||||
rest_activate_resource(&res_sht11, "sensors/sht11");
|
||||
SENSORS_ACTIVATE(sht11_sensor);
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Define application-specific events here. */
|
||||
while(1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue