+#include <RF24.h>
+#include <nRF24L01.h>
+#include <RF24_config.h>
+
+#include <SPI.h>
+
 #include <stdint.h>
 
 #include "zg01_fsm.h"
 
 #define PIN_CLOCK   2
 #define PIN_DATA    3
-#define PIN_LED     13
+
+static long int address = 0x66996699L;  // So that's 0x0066996699
+const int tries = 1;
 
 static uint8_t buffer[5];
+static RF24 rf(/*ce*/ 8, /*cs*/ 10);
 
 void setup(void)
 {

    // wait until clock is low
    while (digitalRead(PIN_CLOCK) != LOW);

    // indicate activity on LED
    digitalWrite(PIN_LED, HIGH);
    
    // sample data and process in the ZG01 state machine
    uint8_t data = (digitalRead(PIN_DATA) == HIGH) ? 1 : 0;
    unsigned long ms = millis();

    pinMode(PIN_CLOCK, INPUT);
    pinMode(PIN_DATA, INPUT);

    // initialize serial port
    Serial.begin(9600);
    Serial.println("Hello world!\n");
    
    // initialize ZG01 finite state machine
    zg01_init(buffer);
    
    // init RF24
    rf.begin();
    rf.setRetries(15, 15);
    rf.enableDynamicPayloads();
    rf.openWritingPipe(address);
}

void loop(void)
