#include "contiki.h"
#include "dev/button-sensor.h"
#include "dev/leds.h"
#include <stdio.h>
#include <string.h>
#define MESSAGE "Hello"
static struct mesh_conn mesh;
PROCESS(example_mesh_process,
"Mesh example");
AUTOSTART_PROCESSES(&example_mesh_process);
static void
sent(struct mesh_conn *c)
{
printf("packet sent\n");
}
static void
timedout(struct mesh_conn *c)
{
printf("packet timedout\n");
}
static void
recv(struct mesh_conn *c, const rimeaddr_t *from, uint8_t hops)
{
printf("Data received from %d.%d: %.*s (%d)\n",
from->u8[0], from->u8[1],
}
{
SENSORS_ACTIVATE(button_sensor);
while(1) {
rimeaddr_t addr;
printf("Button clicked\n");
addr.u8[0] = 1;
addr.u8[1] = 0;
}
}