34 #include "dev/button-sensor.h"
39 #define COOJA_PORT 1234
41 PROCESS(test_uip_process,
"uIP test process");
42 AUTOSTART_PROCESSES(&test_uip_process);
50 printf(
"uIP test process started\n");
53 button_sensor.configure(SENSORS_ACTIVE, 1);
57 printf(
"An event occured: ");
59 if(ev == PROCESS_EVENT_EXIT) {
60 printf(
"shutting down\n");
64 if(ev == sensors_event && data == &button_sensor) {
65 printf(
"button clicked, sending packet\n");
70 }
else if(ev == sensors_event) {
71 printf(
"unknown sensor event: %s\n", ((
struct sensors_sensor *)data)->type);
73 printf(
"a packet was received, toggling leds\n");
75 leds_toggle(LEDS_ALL);
77 printf(
"unknown event: %d\n", ev);