Sure here are the main parts I changed, and this is all code using Rob's library now.
void clearReadings(){
ee.writeBlock(0,0,500);
eeCount = 0;
lcd.clear();
lcd.print("Readings Cleared!");
}
void writeEeBlock(){
eeCount++;
int curSpot = ((eeCount)*16);
eePayload[0] = highByte(curActVal);
eePayload[1] = lowByte(curActVal);
eePayload[2] = highByte(curMon);
eePayload[3] = lowByte(curMon);
eePayload[4] = highByte(curDay);
eePayload[5] = lowByte(curDay);
eePayload[6] = highByte(curYear);
eePayload[7] = lowByte(curYear);
eePayload[8] = highByte(curHour);
eePayload[9] = lowByte(curHour);
eePayload[10] = highByte(curMin);
eePayload[11] = lowByte(curMin);
ee.writeBlock(curSpot, (uint8_t*)&eePayload, 12);
ee.writeBlock(0,(uint8_t*)&eeCount,1);
}
//void writeEeprom(){
// eeCount++;
// int curSpot = ((eeCount-1)*12)+2;
// EEPROMWriteInt(curSpot, curMon);
// curSpot = curSpot+2;
// EEPROMWriteInt(curSpot, curDay);
// curSpot = curSpot+2;
// EEPROMWriteInt(curSpot, curYear);
// curSpot = curSpot+2;
// EEPROMWriteInt(curSpot, curHour);
// curSpot = curSpot+2;
// EEPROMWriteInt(curSpot, curMin);
// curSpot = curSpot+2;
// EEPROMWriteInt(curSpot, curActVal);
// EEPROMWriteInt(0, eeCount);
//}
void reviewReadings(){
if(toGet<=eeCount){
readEeprom();
displayReadings();
toGet++;
}else{
lcd.clear();
lcd.print("No readings!");
toGet = 1;
}
}
void readEeprom(){
int curSpot = ((toGet)*16);
ee.readBlock(curSpot, (uint8_t*)&eePayload, 12);
curActVal = (eePayload[0]<<8)+eePayload[1];
curMon = (eePayload[2]<<8)+eePayload[3];
curDay = (eePayload[4]<<8)+eePayload[5];
curYear = (eePayload[6]<<8)+eePayload[7];
curHour = (eePayload[8]<<8)+eePayload[9];
curMin = (eePayload[10]<<8)+eePayload[11];
// curMon = ee.readByte(curSpot);
// curSpot = curSpot+2;
// curDay = ee.readByte(curSpot);
// curSpot = curSpot+2;
// curYear = ee.readByte(curSpot);
// curSpot = curSpot+2;
// curHour = ee.readByte(curSpot);
// curSpot = curSpot+2;
// curMin = ee.readByte(curSpot);
// curSpot = curSpot+2;
// curActVal = ee.readByte(curSpot);
}
//This function will write a 2 byte integer to the eeprom at the specified address and address + 1
//void EEPROMWriteInt(int p_address, int p_value)
// {
// byte theLowByte = ((p_value >> 0) & 0xFF);
// byte theHighByte = ((p_value >> 8) & 0xFF);
// writeEEPROM(p_address, theLowByte);
// writeEEPROM(p_address + 1, theHighByte);
//}
//This function will read a 2 byte integer from the eeprom at the specified address and address + 1
int EEPROMReadInt(int p_address)
{
byte theLowByte = ee.readByte(p_address);
byte theHighByte = ee.readByte(p_address + 1);
return ((theLowByte << 0) & 0xFF) + ((theHighByte << 8) & 0xFF00);
}