 void goToSleep(void)
 {
     noInterrupts();
-    detachInterrupt(INT1);
-    delay(50);
-    attachInterrupt(INT1, wakeUp, LOW);
+    detachInterrupt( INT1 );
+    attachInterrupt( INT1, wakeUp, LOW );
+    delay(50);
     interrupts();
-    delay(50);
-
-    digitalWrite(led, LOW);
-
-    set_sleep_mode(SLEEP_MODE_PWR_DOWN);
-    sleep_enable();
-
-    radio.powerDown();
-
-    power_spi_disable();    // Disable SPI
-    delay(50);              // Stall for last serial output
-    power_timer0_disable(); // Disable millis() etc.
-    power_usart0_disable(); // Disable Serial
+
+    // Ensure that the LED is off
+    digitalWrite( led, LOW );
+
+    // Disconnect power to the NRF24L01+ radio
+    digitalWrite( nrfModulePowerPin, LOW );
+
+    // Initialize sleep mode
+    SMCR |= (1 << 2);  // Power down mode
+    SMCR |= 1;        // Enable sleep
+
+    // Disable brownout detection
+    MCUCR |= (3 << 5);
+    MCUCR = (MCUCR & ~(1 << 5)) | (1 << 6);
 
     // Go to sleep
-    sleep_mode();
+    __asm__ __volatile("sleep");
 
     /* The program will continue from here. */
     // ....

}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void wakeUp()
{

    {
        // When the button is pressed, flash the LED every half a second for 2 seconds
        // to let the user know that something is happening.
        if ( timePassed < 1500 && (0 < (timePassed % 500) < 10) )
        {
            flashLed(1);
        }
