             digitalWrite(led_pin, led_state);
             radio.powerUp();
             delay(10);
-            send_ok = radio.write( &sensor_state, sizeof(bool), false );
+            send_ok = radio.write( &sensor_state, sizeof(uint8_t), false );
             if (send_ok) {
                 printf("ok\n\r");
             } else {

    if (role == role_remote) {
        // Get the current state of buttons, and
        // Test if the current state is different from the last state we sent
        delay(5);
        bool state = !digitalRead(sensor_pin);
        printf("Sensor state: %d\n", state);
        if (state != sensor_state) {
            different = true;

    if (role == role_led) {
        if (radio.available()) {
            // Dump the payloads until we've gotten everything
            uint8_t done;
            awakems = 0;
            while (!done) {
                done = radio.read( &sensor_state, sizeof(uint8_t) );
            }
//            if (led_state != sensor_state) {
//                different = true;
                printf("Got buttons: %d\n\r", sensor_state);
                led_state = sensor_state;
                digitalWrite(led_pin, led_state);
                awakems = -10000;
//            }
        }
        
