34 #include "contiki-esb.h"
51 static unsigned char pingeron;
54 static unsigned short sent_seqno, last_seqno;
58 static int place_id = 0, packet_count = 0;
70 udp_appcall(
void *arg)
77 leds_toggle(LEDS_YELLOW);
107 leds_toggle(LEDS_GREEN);
110 if(packet_count == 0) {
117 PT_THREAD(config_thread(
struct pt *pt, process_event_t ev, process_data_t data))
119 static struct etimer pushtimer;
127 PT_WAIT_UNTIL(pt, ev == sensors_event && data == &button_sensor);
131 leds_on(LEDS_YELLOW);
136 PT_YIELD_UNTIL(pt, (ev == sensors_event && data == &button_sensor) ||
142 beep_quick(place_id);
150 leds_off(LEDS_YELLOW);
164 static struct pt config_pt;
174 button_sensor.configure(SENSORS_ACTIVE, 1);
179 config_thread(&config_pt, ev, data);
183 printf(
"Event %d\n", ev);