 
     triggerButton.poll();
     resetButton.poll();
+
+    // Check for and handle incoming bytes first to make sure
+    // that buffers are clear. If they aren't, acks may not work correctly.
+    if (radio.available()) {
+        Serial.println("Data available");
+        byte recvByte = receiveByte();
+        if (recvByte == heightInitialVal)
+        {
+            //receiveData(&lastAltitude, sizeof(float));
+            Serial.println("Got altitude");
+        }
+        else
+        {
+            Serial.println("Received unknown header data!");
+        }
+    }
 
     // Require a long press to activate
     if (triggerButton.longPress()) {

    return recvByte;
}

void validateAck(byte ackResponse) {
    if (ackResponse == ackVal) {
        isCommHealthy = true;
        Serial.println("Comms healthy");
    }
    else {
        isCommHealthy = false;
        Serial.println("Bad ack received! This probably means that the connection is unstable.");
    }

    // We have validated that data was successfully sent; we can consider this a heartbeat.
    lastHeartbeat = millis();
}
#endif

void loop()
{

#endif
}


byte sendData(void* val, int numBytes) {
    byte recvByte;

    if (radio.available())
        Serial.println("Data available before request was sent! This probably means something was not read correctly.");

    Serial.print("Sending data ");
    for (int i = 0; i < numBytes; i++)
    {
        Serial.print(((byte*)val)[i]);
        Serial.print(" ");
    }
    Serial.println();

    radio.stopListening();
    bool writeResult = radio.write(val, numBytes);
    radio.startListening();

    if (writeResult) {
        if (!radio.available()) {
            Serial.println("Empty recv!");
            return 0;
        }
        else {
            radio.read(&recvByte, 1);
            radio.writeAckPayload(1, &ackVal, 1);

            Serial.print("Received ack byte ");
            Serial.println((int)recvByte);
        }
