33 #include "contiki-esb.h"
37 PROCESS(sensor_output_process,
"Sensor output");
39 AUTOSTART_PROCESSES(&sensor_output_process);
44 struct sensors_sensor *s;
49 button_sensor.configure(SENSORS_ACTIVE, 1);
50 pir_sensor.configure(SENSORS_ACTIVE, 1);
51 vib_sensor.configure(SENSORS_ACTIVE, 1);
56 s = (
struct sensors_sensor *)data;
57 printf(
"%s %d\n", s->type, s->value(0));
59 if (data == &button_sensor) leds_invert(LEDS_YELLOW);
60 if (data == &pir_sensor) leds_invert(LEDS_GREEN);
61 if (data == &vib_sensor) leds_invert(LEDS_RED);