  */
 void loop()
 {
-    determinePowerState();
+    // determinePowerState();
     determineSleepState();
 
     delay(config.loop_delay);

void loadConfiguration() {
    // Ensure the version string matches our version string; if it doesn't, we
    // should just use the default configuration
    if (EEPROM.readByte(config_address + sizeof(config) - 1) == *config.version[3]
        && EEPROM.readByte(config_address + sizeof(config) - 2) == *config.version[2]
        && EEPROM.readByte(config_address + sizeof(config) - 3) == *config.version[1]
        && EEPROM.readByte(config_address + sizeof(config) - 4) == *config.version[0]) {
        Serial.println("Configuration matched!");
        EEPROM.readBlock(config_address, config);
    } else {
        Serial.println("Configuration did not match!");
    }
}


#include <avr/sleep.h>
#include <EEPROMex.h>

// Configuration version, used for validating configuration integrity.
#define CONFIG_VERSION "001"

// Size of the configuration block memory pool.
const int CONFIG_MEMORY_SIZE = 32;

// EEPROM size. Bad things will happen if this isn't set correctly.
const int CONFIG_EEPROM_SIZE = EEPROMSizeATmega328;

// Config memory address, used to determine where to read and write data.
int config_address = 0;

// Configuration structure. Also contains the default configuration.
struct ConfigurationStruct {
    // Character string indicating configuration version.
    char version[4];

    // Delay between loops, in milliseconds.
    int loop_delay;

    // Serial input buffer size, in bytes.
    int serial_input_buffer_size;

    // Boolean indicating whether debug mode is enabled.
    bool debug;
} config = {
    CONFIG_VERSION,
    50,
    32,
    false
};

// Serial input structure.
struct SerialInputStruct {
    // Boolean indicating whether the input buffer is ready for processing.
    bool ready;

    // Input buffer containing received serial data.
    String buffer;
} serial_input = {
    false,
    ""
};

// Power button pin number.
const int POWER_BTN = 2;

// Power LED pin number.
const int POWER_LED = 13;

// Byte containing states/state history of the power button.
byte POWER_BTN_STATES = B11111111;

// Enum containing power states.
enum PowerState {
    SLEEPING,
    AWAKE
};

// Current power state
int POWER_STATE = AWAKE;

/**
