     bool data = (digitalRead(PIN_DATA) == HIGH);
     unsigned long ms = millis();
     bool ready = zg01_process(ms, data);
-    
+
     // process data if ready
     if (ready) {
         // dump buffer to serial

        // send CO2 measurement over RF24
        if (buffer[0] == 'P') {
            // construct buffer: [length]"CO_2"[ppm high byte][ppm low byte]
            uint8_t buf[8];
            buf[0] = 6;
            memcpy(&buf[1], "CO_2", 4);
            memcpy(&buf[5], &buffer[1], 2);
            // dump send buffer
            Serial.print("Send:");
            for (int i = 0; i < 6; i++) {
                Serial.print(buf[i], HEX);
                Serial.print(" ");
            }
            Serial.println();
            // send it
            rf.write(&buf, 7);
        }
    }


const int tries = 1;

static uint8_t buffer[5];
static RF24 rf(/*ce*/ 8, /*cs*/ 9);

void setup(void)
{
