33 #include "dev/button-sensor.h"
34 #include "dev/pir-sensor.h"
35 #include "dev/vib-sensor.h"
39 PROCESS(test_sensors_process,
"Test sensors process");
40 AUTOSTART_PROCESSES(&test_sensors_process);
46 printf(
"Starting sensors test process\n");
47 button_sensor.configure(SENSORS_ACTIVE, 1);
48 pir_sensor.configure(SENSORS_ACTIVE, 1);
49 vib_sensor.configure(SENSORS_ACTIVE, 1);
54 if (ev == sensors_event) {
55 if (data == &button_sensor) {
57 }
else if (data == &vib_sensor) {
58 printf(
"Vibration sensor\n");
59 }
else if (data == &pir_sensor) {
60 printf(
"Passive IR sensor\n");
62 printf(
"Unknown sensor\n");
65 printf(
"Non-sensor event triggered\n");