     }
     Serial.println(F("}"));
 
+    // Stop listening temporarily so we can write
     radio.stopListening();
-    bool writeResult = radio.write(val, numBytes);
+    bool writeSuccess = radio.write(val, numBytes);
     radio.startListening();
 
-    if (writeResult) {
+    if (writeSuccess) {
         if (!radio.available()) {
-            Serial.println(F("Empty recv!"));
+            Serial.println(F("Empty receive buffer! Was expecting an ack."));
             return 0;
         }
         else {
             radio.read(&recvByte, 1);
-            radio.writeAckPayload(1, &ackVal, 1);
+            radio.writeAckPayload(primaryPipeIndex, &ackVal, 1);
 
             Serial.print(F("Received ack"));
         }

bool receiveData(void* recvBuf, uint8_t numBytes) {
    if (radio.available()) {
        radio.read(recvBuf, numBytes);
        // acks that we received it
        radio.writeAckPayload(1, &ackVal, 1);
        return true;
    }
    else {


    radio.startListening();
    radio.printDetails();
    radio.writeAckPayload(primaryPipeIndex, &ackVal, 1);

#if ROLE == ROLE_GROUND
    //pinMode(heartbeatLEDGreenPin, OUTPUT);
