Error: 'PULLDOWN' was not declared in this scope

I'm trying to upload a script to an Arduino Nano that used to work way back in 2011. But for some reason, I'm now getting an issue saying PULLDOWN is not declared. But looking at the Button.h, it is. I thought it may just be the latest version of Arduino IDE I'm using, so the sketch had 'Sketch developed in Arduino-22', so I grabbed the version from the archives... still the same error. What am I doing wrong?

[code]C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:64:29: error: 'PULLDOWN' was not declared in this scope
Button menu = Button(12,PULLDOWN);
^~~~~~~~
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:65:29: error: 'PULLDOWN' was not declared in this scope
Button select = Button(13,PULLDOWN);
^~~~~~~~
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:66:29: error: 'PULLDOWN' was not declared in this scope
Button plus = Button(14,PULLDOWN);
^~~~~~~~
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:67:29: error: 'PULLDOWN' was not declared in this scope
Button minus = Button(15,PULLDOWN);
^~~~~~~~

exit status 1

Compilation error: 'PULLDOWN' was not declared in this scope[/code]

And here's the button portion of the sketch:

// create the buttons Button menu = Button(12,PULLDOWN); Button select = Button(13,PULLDOWN); Button plus = Button(14,PULLDOWN); Button minus = Button(15,PULLDOWN);

The nano does not have pulldown resistors. Pullups, yes. And the library I see no reference to pulldown.

Can you show your full code and explain what you are trying to do?

Thanks John. After looking at the Button example 'basic_usage', it doesn't have PULLDOWN...

Button button1(2); // Connect your button between pin 2 and GND
Button button2(3); // Connect your button between pin 3 and GND
Button button3(4); // Connect your button between pin 4 and GND

So I modified to...

Button menu     = Button(12);
Button select   = Button(13);
Button plus     = Button(14);
Button minus    = Button(15);

And now it doesn't error out anymore.

The sketch is for a reef tank LED controller, capable of 4 separate LED channels, each starting, stopping and fade in/out on their own. I'm trying to rewrite it to simply trip a single relay to turn a grow panel on and off at specified times, without the fade function. I DIY'd my own Arduino on a pcb breadboard back in 2011 for the project, and looking back, I think it was an Arduino Uno. The sketch doesn't error out on the pulldown anymore, but now there's other issues, specifically 'decToBcd'...

C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:86:7: error: expected constructor, destructor, or type conversion before 'decToBcd'
 
       ^       
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:91:6: error: expected constructor, destructor, or type conversion before 'decToBcd'
 byte decToBcd(byte val)
      ^~~~~~~~
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino: In function 'void setDate(byte, byte, byte, byte, byte, byte, byte)':
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:110:9: error: 'class TwoWire' has no member named 'send'; did you mean 'end'?
    Wire.send(0);
         ^~~~
         end
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:111:9: error: 'class TwoWire' has no member named 'send'; did you mean 'end'?
    Wire.send(decToBcd(second));
         ^~~~
         end
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:111:14: error: 'decToBcd' was not declared in this scope
    Wire.send(decToBcd(second));
              ^~~~~~~~
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:111:14: note: suggested alternative: 'second'
    Wire.send(decToBcd(second));
              ^~~~~~~~
              second
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:112:9: error: 'class TwoWire' has no member named 'send'; did you mean 'end'?
    Wire.send(decToBcd(minute));
         ^~~~
         end
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:113:9: error: 'class TwoWire' has no member named 'send'; did you mean 'end'?
    Wire.send(decToBcd(hour));
         ^~~~
         end
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:114:9: error: 'class TwoWire' has no member named 'send'; did you mean 'end'?
    Wire.send(decToBcd(dayOfWeek));
         ^~~~
         end
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:115:9: error: 'class TwoWire' has no member named 'send'; did you mean 'end'?
    Wire.send(decToBcd(dayOfMonth));
         ^~~~
         end
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:116:9: error: 'class TwoWire' has no member named 'send'; did you mean 'end'?
    Wire.send(decToBcd(month));
         ^~~~
         end
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:117:9: error: 'class TwoWire' has no member named 'send'; did you mean 'end'?
    Wire.send(decToBcd(year));
         ^~~~
         end
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino: In function 'void getDate(byte*, byte*, byte*, byte*, byte*, byte*, byte*)':
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:131:8: error: 'class TwoWire' has no member named 'send'; did you mean 'end'?
   Wire.send(0);
        ^~~~
        end
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:134:31: error: 'class TwoWire' has no member named 'receive'; did you mean 'onReceive'?
   *second     = bcdToDec(Wire.receive() & 0x7f);
                               ^~~~~~~
                               onReceive
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:135:31: error: 'class TwoWire' has no member named 'receive'; did you mean 'onReceive'?
   *minute     = bcdToDec(Wire.receive());
                               ^~~~~~~
                               onReceive
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:136:31: error: 'class TwoWire' has no member named 'receive'; did you mean 'onReceive'?
   *hour       = bcdToDec(Wire.receive() & 0x3f);
                               ^~~~~~~
                               onReceive
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:137:31: error: 'class TwoWire' has no member named 'receive'; did you mean 'onReceive'?
   *dayOfWeek  = bcdToDec(Wire.receive());
                               ^~~~~~~
                               onReceive
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:138:31: error: 'class TwoWire' has no member named 'receive'; did you mean 'onReceive'?
   *dayOfMonth = bcdToDec(Wire.receive());
                               ^~~~~~~
                               onReceive
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:139:31: error: 'class TwoWire' has no member named 'receive'; did you mean 'onReceive'?
   *month      = bcdToDec(Wire.receive());
                               ^~~~~~~
                               onReceive
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:140:31: error: 'class TwoWire' has no member named 'receive'; did you mean 'onReceive'?
   *year       = bcdToDec(Wire.receive());
                               ^~~~~~~
                               onReceive
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino: At global scope:
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:152:3: error: expected identifier before '{' token
   {
   ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:152:3: error: expected ')' before '{' token
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino: In function 'int setLed(int, int, int, int, int)':
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:159:48: error: 'fade' was not declared in this scope
             val=map((start+period-mins)%1440,0,fade,0,ledMax);
                                                ^~~~
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:159:48: note: suggested alternative: 'free'
             val=map((start+period-mins)%1440,0,fade,0,ledMax);
                                                ^~~~
                                                free
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:159:55: error: 'ledMax' was not declared in this scope
             val=map((start+period-mins)%1440,0,fade,0,ledMax);
                                                       ^~~~~~
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:159:55: note: suggested alternative: 'ledPin'
             val=map((start+period-mins)%1440,0,fade,0,ledMax);
                                                       ^~~~~~
                                                       ledPin
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:171:1: error: a function-definition is not allowed here before '{' token
 {
 ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:191:18: error: a function-definition is not allowed here before '{' token
               )  {
                  ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:210:1: error: a function-definition is not allowed here before '{' token
 {
 ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:228:17: error: a function-definition is not allowed here before '{' token
 void printDate(){
                 ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:291:31: error: a function-definition is not allowed here before '{' token
 /***************/void setup() {
                               ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:306:31: error: a function-definition is not allowed here before '{' token
 /****************/void loop() {
                               ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:504:1: error: expected '}' at end of input
 }
 ^

exit status 1

Compilation error: expected constructor, destructor, or type conversion before 'decToBcd'

And here's the full sketch, with the button error fixed. I still need to modify it to a single channel without the fade functions. I still need the time/date, temperature and menu entry options, and I'm adding a humidity sensor as well, which I found some code that just needs to be written in. But as long as I can get the on/off timer working, I'll be a happy camper.

/*
// Typhon firmware
// v0.3 alpha 2011-16-11
// N. Enders, R. Ensminger
//
// This sketch provides firmware for the Typhon LED controller.
// It provides a structure to fade 4 independent channels of LED lighting
// on and off each day, to simulate sunrise and sunset.
//
// Current work in progress:
// - store all LED variables in EEPROM so they are not reset by a loss of power
// - allow for signals to be inverted for buckpucks or other drivers that consider 0 to be "on"
//
// Future developments may include:
// - moon phase simulation
// - storm simulation
// - support for plugin hardware modules for temperature, pH, relay control, etc.
//
// Sketch developed in Arduino-22
// Requires LiquidCrystal, Wire, EEPROM, EEPROMVar, and Button libraries.
// Button is available here: http://www.arduino.cc/playground/Code/Button
// EEPROMVar is available here: http://www.arduino.cc/playground/uploads/Profiles/EEPROMVar_01.zip
*/

// include the libraries:
#include <LiquidCrystal.h>
#include <Wire.h>
#include <Button.h>
#include <EEPROM.h>
#include <EEPROMVar.h>

/**** Define Variables & Constants ****/
/**************************************/

// set the RTC's I2C address
#define DS1307_I2C_ADDRESS 0x68

// create the LCD
LiquidCrystal lcd(8, 7, 5, 4, 16, 2);

// set up backlight
int bkl         = 6;        // backlight pin
byte bklIdle    = 10;       // PWM value for backlight at idle
byte bklOn      = 70;       // PWM value for backlight when on
int bklDelay    = 10000;    // ms for the backlight to idle before turning off
unsigned long bklTime = 0;  // counter since backlight turned on

// create the menu counter
int menuCount   = 1;
int menuSelect = 0;

//create the plus and minus navigation delay counter with its initial maximum of 250.
byte btnMaxDelay = 200;
byte btnMinDelay = 25;
byte btnMaxIteration = 5;
byte btnCurrIteration;

//create manual override variables
boolean override = false;
byte overmenu = 0;
int overpercent = 0;

// create the buttons
Button menu     = Button(12);
Button select   = Button(13);
Button plus     = Button(14);
Button minus    = Button(15);

// LED variables. These control the behavior of lighting. Change these to customize behavoir
int minCounter = 0;         // counter that resets at midnight.
int oldMinCounter = 0;      // counter that resets at midnight.
int oneLed = 9;             // pin for channel 1
int twoLed = 10;            // pin for channel 2
int threeLed = 11;          // pin for channel 3
int fourLed = 3;            // pin for channel 4
int oneVal = 0;             // current value for channel 1
int twoVal = 0;             // current value for channel 2
int threeVal = 0;           // current value for channel 3
int fourVal = 0;            // current value for channel 4


// Variables making use of EEPROM memory:
EEPROMVar<int> oneStartMins = 750;      // minute to start this channel.
EEPROMVar<int> onePhotoPeriod = 720;   // photoperiod in minutes for this channel.


*//****** RTC Functions ******/
/***************************/

// Convert decimal numbers to binary coded decimal
byte decToBcd(byte val)
{
  return ( (val/10*16) + (val%10) );
}// Convert binary coded decimal to decimal numbers
byte bcdToDec(byte val)
{
  return ( (val/16*10) + (val%16) );
}

// Sets date and time, starts the clock
void setDate(byte second,        // 0-59
             byte minute,        // 0-59
             byte hour,          // 1-23
             byte dayOfWeek,     // 1-7
             byte dayOfMonth,    // 1-31
             byte month,         // 1-12
             byte year)          // 0-99
{
   Wire.beginTransmission(DS1307_I2C_ADDRESS);
   Wire.send(0);
   Wire.send(decToBcd(second));
   Wire.send(decToBcd(minute));
   Wire.send(decToBcd(hour));
   Wire.send(decToBcd(dayOfWeek));
   Wire.send(decToBcd(dayOfMonth));
   Wire.send(decToBcd(month));
   Wire.send(decToBcd(year));
   Wire.endTransmission();
}

// Gets the date and time
void getDate(byte *second,
             byte *minute,
             byte *hour,
             byte *dayOfWeek,
             byte *dayOfMonth,
             byte *month,
             byte *year)
{
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.send(0);
  Wire.endTransmission();
  Wire.requestFrom(DS1307_I2C_ADDRESS, 7);
  *second     = bcdToDec(Wire.receive() & 0x7f);
  *minute     = bcdToDec(Wire.receive());
  *hour       = bcdToDec(Wire.receive() & 0x3f);
  *dayOfWeek  = bcdToDec(Wire.receive());
  *dayOfMonth = bcdToDec(Wire.receive());
  *month      = bcdToDec(Wire.receive());
  *year       = bcdToDec(Wire.receive());
}

/****** LED Functions ******/
/***************************/

//function to set LED brightness according to time of day
//function has three equal phases - ramp up, hold, and ramp down
            int   setLed(int mins,         // current time in minutes
            int ledPin,        // pin for this channel of LEDs
            int start,         // start time for this channel of LEDs
            int period,        // photoperiod for this channel of LEDs
  {
  int val = 0;
     
      //off or post-midnight run.
      if (mins <= start || mins > start + period)  {
        if((start+period)%1440 < start && (start + period)%1440 > mins )
          {
            val=map((start+period-mins)%1440,0,fade,0,ledMax);
          }
        else 
        val = 0;
      }
   

/**** Display Functions ****/
/***************************/

//button hold function
int btnCurrDelay(byte curr)
{
  if(curr==btnMaxIteration)
  {
    btnCurrIteration = btnMaxIteration;
    return btnMaxDelay;
  }
  else if(btnCurrIteration ==0)
  {
    return btnMinDelay;
  }
  else
  {
    btnCurrIteration--;
    return btnMaxDelay;
  }
}

// format a number of minutes into a readable time (24 hr format)
void printMins(int mins,       //time in minutes to print
               boolean ampm    //print am/pm?
              )  {
  int hr = (mins%1440)/60;
  int mn = mins%60;
    if(hr<10){
      lcd.print(" ");
    }
    lcd.print(hr);
    lcd.print(":");
    if(mn<10){
      lcd.print("0");
    }
    lcd.print(mn);
}

// format hours, mins, secs into a readable time (24 hr format)
void printHMS (byte hr,
               byte mn,
               byte sec      //time to print
              ) 
{
 
    if(hr<10){
      lcd.print(" ");
    }
    lcd.print(hr, DEC);
    lcd.print(":");
    if(mn<10){
      lcd.print("0");
    }
    lcd.print(mn, DEC);
    lcd.print(":");
    if(sec<10){
      lcd.print("0");
    }
    lcd.print(sec, DEC);
}

void printDate(){

	// Reset the register pointer
	Wire.beginTransmission(DS1307_I2C_ADDRESS);
	Wire.send(0);
	Wire.endTransmission();

	Wire.requestFrom(DS1307_I2C_ADDRESS, 7);

	int second = bcdToDec(Wire.receive());
	int minute = bcdToDec(Wire.receive());
	int hour = bcdToDec(Wire.receive() & 0b111111); //24 hour time
	int dayOfWeek = bcdToDec(Wire.receive()); //0-6 -> sunday - Saturday
	int dayOfMonth = bcdToDec(Wire.receive());
	int month = bcdToDec(Wire.receive());
	int year = bcdToDec(Wire.receive());

	//print the date EG   3/1/11 23:59:59
	//  lcd.print(dayOfWeek);

	switch(dayOfWeek){
		case 1: 
			lcd.print("Sun");
			break;
		case 2: 
			lcd.print("Mon");
			break;
		case 3: 
			lcd.print("Tue");
			break;
		case 4: 
			lcd.print("Wed");
			break;
		case 5: 
			lcd.print("Thu");
			break;
		case 6: 
			lcd.print("Fri");
			break;
		case 7: 
			lcd.print("Sat");
			break;
	}

	lcd.print(" ");
	if (dayOfMonth < 10){
		lcd.print("0");
	}
	lcd.print(dayOfMonth);
	lcd.print("/");
	if (month < 10){
		lcd.print("0");
	}
	lcd.print(month);
	lcd.print("/20");
	if (year < 10){
		lcd.print("0");
	}
	lcd.print(year);
}


/**** Setup ****/
/***************/void setup() {
  Wire.begin();
  pinMode(bkl, OUTPUT);
  lcd.begin(16, 2);
  digitalWrite(bkl, HIGH);
  lcd.print("Typhon-Reef");
  lcd.setCursor(0,1);
  lcd.print("");
  delay(5000);
  lcd.clear();
  analogWrite(bkl,bklIdle);
  btnCurrIteration = btnMaxIteration;
}

/***** Loop *****/
/****************/void loop() {
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;  getDate(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
  oldMinCounter = minCounter;
  minCounter = hour * 60 + minute;
 
  //reset plus & minus acceleration counters if the button's state has changed
  if(plus.stateChanged())
  {
   btnCurrDelay(btnMaxIteration);
  }
  if(minus.stateChanged())
  { 
    btnCurrDelay(btnMaxIteration);
  }
      
 
 
  //check & set any time functions
 
 
  //set outputs
  if(!override){
  oneVal = setLed(minCounter, oneLed, oneStartMins, onePhotoPeriod);

  else{
    ovrSetAll(overpercent);
  }
 
 
  //turn the backlight off and reset the menu if the idle time has elapsed
  if(bklTime + bklDelay < millis() && bklTime > 0 ){
    analogWrite(bkl,bklIdle);
    menuCount = 1;
    lcd.clear();
    bklTime = 0;
  }  


  //iterate through the menus
  if(menu.uniquePress()){
    analogWrite(bkl,bklOn);
    bklTime = millis();
    if(menuCount < 6){
      menuCount++;
    }else {
      menuCount = 1;
    }
  lcd.clear();
  }
  if(menuCount == 1){
    //main screen turn on!!!
    if (minCounter > oldMinCounter){
      lcd.clear();
    }
    lcd.setCursor(0,0);
    printHMS(hour, minute, second);
    lcd.setCursor(0,1);
    lcd.print(oneVal);
    lcd.setCursor(4,1);
    lcd.print(twoVal);
    lcd.setCursor(8,1);
    lcd.print(threeVal);
    lcd.setCursor(12,1);
    lcd.print(fourVal);


    //debugging function to use the select button to advance the timer by 1 minute
    //if(select.uniquePress()){setDate(second, minute+1, hour, dayOfWeek, dayOfMonth, month, year);}
  }
 
  if(menuCount == 2){
    //Manual Override Menu
    lcd.setCursor(0,0);
    lcd.print("Manual Overrides");
    lcd.setCursor(0,1);
    lcd.print("All: ");
    if(select.uniquePress()){
      if(menuSelect < 3){menuSelect++;}
      else{menuSelect = 0;}
      bklTime = millis();
    }
   
    if(menuSelect == 0){
      lcd.print("Timer");
      override = false;}
    if(menuSelect == 1){
      lcd.print("ON   ");
      overpercent = 100;
      override = true;}
    if(menuSelect == 2){
      lcd.print("OFF  ");
      overpercent = 0;
      override = true;}   
    if(menuSelect == 3){
      override = true;
      lcd.print(overpercent,DEC);
      lcd.print("%  ");
      if(plus.isPressed() && overpercent <100)
        {
          overpercent++;
          delay(btnCurrDelay(btnCurrIteration-1));
          bklTime = millis();
        }
       
        if(minus.isPressed() && overpercent > 0)
        {
          overpercent--;
          delay(btnCurrDelay(btnCurrIteration-1));
          bklTime = millis();
        }
      }
}


  if(menuCount == 3){
    //set start time for channel one
    lcd.setCursor(0,0);
    lcd.print("Channel 1 Start");
    lcd.setCursor(0,1);
    printMins(oneStartMins, true);
   
    if(plus.isPressed() && oneStartMins < 1440){
        oneStartMins++;
        if(onePhotoPeriod >0){onePhotoPeriod--;}
        else{onePhotoPeriod=1439;}
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if(minus.isPressed() && oneStartMins > 0){
        oneStartMins--;
        if(onePhotoPeriod<1439){onePhotoPeriod++;}
        else{onePhotoPeriod=0;}
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }  if(menuCount == 4){
    //set end time for channel one
    lcd.setCursor(0,0);
    lcd.print("Channel 1 End");
    lcd.setCursor(0,1);
    printMins(oneStartMins+onePhotoPeriod, true);
    if(plus.isPressed()){
      if(onePhotoPeriod < 1439){
      onePhotoPeriod++;}
      else{
        onePhotoPeriod=0;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if(minus.isPressed()){
      if(onePhotoPeriod >0){
        onePhotoPeriod--;}
      else{
        onePhotoPeriod=1439;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }  

  if(menuCount == 5){
    //set hours
    lcd.setCursor(0,0);
    lcd.print("Set Time: Hrs");
    lcd.setCursor(0,1);
    printHMS(hour, minute, second);
    if(plus.isPressed() && hour < 23){
      hour++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if(minus.isPressed() && hour > 0){
      hour--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  setDate(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
  }
 
  if(menuCount == 6){
    //set minutes
    lcd.setCursor(0,0);
    lcd.print("Set Time: Mins");
    lcd.setCursor(0,1);
    printHMS(hour, minute, second);
    if(plus.isPressed() && minute < 59){
      minute++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if(minus.isPressed() && minute > 0){
      minute--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  setDate(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
  }
}

Edit: Actually, if the errors are device specific, then I have parts for a few more Uno's, or I can just pick one up. It just would be nice to use these Nano's if I could.

Also, here's the EEPROMVar.h I found. It used to be in the playground, but it seems things have changed and now it's not. But after an extensive search, I found a file... just not sure if it's the original.

#include <Arduino.h> //changed from WProgram.h
#include <EEPROM.h>
/*
   www.alexanderbrevig.com
   AlphaBeta
*/

class EEPROMAddressCounter {
protected:
  static int availableAddress;
};
int EEPROMAddressCounter::availableAddress = 0;

template<typename T>
class EEPROMVar : 
public EEPROMAddressCounter {
public:
  static const byte IS_INITIALIZED = B10101010;
  EEPROMVar(T init) {
    address = availableAddress;
    var = init;
    restore();
    availableAddress += sizeof(T) + 1; //make room for the is initialized flag
  }
  operator T () { 
    return var; 
  }
  EEPROMVar &operator=(T val) {
    var = val;
    save();
  }
  void operator++(int) {
    var += T(1); //cast for safety
    save();
  }
  void operator--(int) {
    var -= T(1); //cast for safety
    save();
  }
  void operator++() {
    var += T(1); //cast for safety
    save();
  }
  void operator--() {
    var -= T(1); //cast for safety
    save();
  }
  template<typename V>
    void operator /= (V divisor) {
    var = var / divisor;
    save();
  }
  template<typename V>
    void operator *= (V multiplicator) {
    var = var * multiplicator;
    save();
  }
protected:
  void save(){
    union {
      byte raw[ sizeof(T) ];
      T data;
    } writer;
    writer.data = var;
    for (byte i=0; i<sizeof(T); i++) {
       EEPROM.write(address + 1 + i, writer.raw[i]);
    }
  }
  void restore(){
    
    byte init = EEPROM.read(address);
    
    if (init!=EEPROMVar::IS_INITIALIZED) {
      //it was not initialized
      EEPROM.write(address,EEPROMVar::IS_INITIALIZED);
      union {
        byte raw[ sizeof(T) ];
        T data;
      } writer;
      writer.data = var;
      for (byte i=0; i<sizeof(T); i++) {
         EEPROM.write(address + 1 + i, writer.raw[i]);
      }
    }
    //read from EEPROM
    union {
      byte raw[ sizeof(T) ];
      T data;
    } reader;
    for (byte i=0; i<sizeof(T); i++) {
       reader.raw[i] =  EEPROM.read(address + 1 + i);\
    }
    var = reader.data;
  }
  T var;
  int address;
};

Well, after a bit of editing, I'm actually getting somewhere. Seeing as I don't intend to use the fade functions, I did away with EEPROMVar. The functions to fade and handle multiple channels are still in the sketch for now, just until I get it to compile properly first, then I'll edit it to what I need.

I also needed to change '(Wire.receive) to (Wire.read), and (Wire.send) with (Wire.write). Found that in a post here about Wire.h not compiling due to the sketch being so old.

/*
// Typhon firmware
// v0.3 alpha 2011-16-11
// N. Enders, R. Ensminger
//
// This sketch provides firmware for the Typhon LED controller.
// It provides a structure to fade 4 independent channels of LED lighting
// on and off each day, to simulate sunrise and sunset.
//
// Current work in progress:
// - store all LED variables in EEPROM so they are not reset by a loss of power
// - allow for signals to be inverted for buckpucks or other drivers that consider 0 to be "on"
//
// Future developments may include:
// - moon phase simulation
// - storm simulation
// - support for plugin hardware modules for temperature, pH, relay control, etc.
//
// Sketch developed in Arduino-22
// Requires LiquidCrystal, Wire, EEPROM, EEPROMVar, and Button libraries.
// Button is available here: http://www.arduino.cc/playground/Code/Button
// EEPROMVar is available here: http://www.arduino.cc/playground/uploads/Profiles/EEPROMVar_01.zip
*/

// include the libraries:
#include <LiquidCrystal.h>
#include <Wire.h>
#include <Button.h>
#include <EEPROM.h>
//#include <EEPROMVar.h>

/**** Define Variables & Constants ****/
/**************************************/

// set the RTC's I2C address
#define DS1307_I2C_ADDRESS 0x68

// create the LCD
LiquidCrystal lcd(8, 7, 5, 4, 16, 2);

// set up backlight
int bkl = 6;                // backlight pin
byte bklIdle = 10;          // PWM value for backlight at idle
byte bklOn = 70;            // PWM value for backlight when on
int bklDelay = 10000;       // ms for the backlight to idle before turning off
unsigned long bklTime = 0;  // counter since backlight turned on

// create the menu counter
int menuCount = 1;
int menuSelect = 0;

//create the plus and minus navigation delay counter with its initial maximum of 250.
byte btnMaxDelay = 200;
byte btnMinDelay = 25;
byte btnMaxIteration = 5;
byte btnCurrIteration;

//create manual override variables
boolean override = false;
byte overmenu = 0;
int overpercent = 0;

// create the buttons
Button menu = Button(12);
Button select = Button(13);
Button plus = Button(14);
Button minus = Button(15);

// LED variables. These control the behavior of lighting. Change these to customize behavoir
int minCounter = 0;     // counter that resets at midnight.
int oldMinCounter = 0;  // counter that resets at midnight.
int oneLed = 9;         // pin for channel 1
int oneVal = 0;         // current value for channel 1


// Variables making use of EEPROM memory:
//EEPROMVar<int> oneStartMins = 750;      // minute to start this channel.
//EEPROMVar<int> onePhotoPeriod = 720;   // photoperiod in minutes for this channel.

const int oneStartMins = 750;    // minute to start this channel.
const int onePhotoPeriod = 720;  // photoperiod in minutes for this channel.


*  //****** RTC Functions ******/
  /***************************/

  // Convert decimal numbers to binary coded decimal
  byte
  decToBcd(byte val) {
  return ((val / 10 * 16) + (val % 10));
}  // Convert binary coded decimal to decimal numbers
byte bcdToDec(byte val) {
  return ((val / 16 * 10) + (val % 16));
}

// Sets date and time, starts the clock
void setDate(byte second,      // 0-59
             byte minute,      // 0-59
             byte hour,        // 1-23
             byte dayOfWeek,   // 1-7
             byte dayOfMonth,  // 1-31
             byte month,       // 1-12
             byte year)        // 0-99
{
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.write(0);
  Wire.write(decToBcd(second));
  Wire.write(decToBcd(minute));
  Wire.write(decToBcd(hour));
  Wire.write(decToBcd(dayOfWeek));
  Wire.write(decToBcd(dayOfMonth));
  Wire.write(decToBcd(month));
  Wire.write(decToBcd(year));
  Wire.endTransmission();
}

// Gets the date and time
void getDate(byte *second,
             byte *minute,
             byte *hour,
             byte *dayOfWeek,
             byte *dayOfMonth,
             byte *month,
             byte *year) {
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.write(0);
  Wire.endTransmission();
  Wire.requestFrom(DS1307_I2C_ADDRESS, 7);
  *second = bcdToDec(Wire.read() & 0x7f);
  *minute = bcdToDec(Wire.read());
  *hour = bcdToDec(Wire.read() & 0x3f);
  *dayOfWeek = bcdToDec(Wire.read());
  *dayOfMonth = bcdToDec(Wire.read());
  *month = bcdToDec(Wire.read());
  *year = bcdToDec(Wire.read());
}

/****** LED Functions ******/
/***************************/

//function to set LED brightness according to time of day
//function has three equal phases - ramp up, hold, and ramp down
int setLed(int mins,         // current time in minutes
           int ledPin,       // pin for this channel of LEDs
           int start,        // start time for this channel of LEDs
           int period,       // photoperiod for this channel of LEDs
           int fade,         // fade duration for this channel of LEDs
           int ledMax,       // max value for this channel
           boolean inverted  // true if the channel is inverted
) {
  int val = 0;

  //off or post-midnight run.
  if (mins <= start || mins > start + period) {
    if ((start + period) % 1440 < start && (start + period) % 1440 > mins) {
      val = map((start + period - mins) % 1440, 0, fade, 0, ledMax);
    } else
      val = 0;
  }


  /**** Display Functions ****/
  /***************************/

  //button hold function
  int btnCurrDelay(byte curr) {
    if (curr == btnMaxIteration) {
      btnCurrIteration = btnMaxIteration;
      return btnMaxDelay;
    } else if (btnCurrIteration == 0) {
      return btnMinDelay;
    } else {
      btnCurrIteration--;
      return btnMaxDelay;
    }
  }

  // format a number of minutes into a readable time (24 hr format)
  void printMins(int mins,     //time in minutes to print
                 boolean ampm  //print am/pm?
  ) {
    int hr = (mins % 1440) / 60;
    int mn = mins % 60;
    if (hr < 10) {
      lcd.print(" ");
    }
    lcd.print(hr);
    lcd.print(":");
    if (mn < 10) {
      lcd.print("0");
    }
    lcd.print(mn);
  }

  // format hours, mins, secs into a readable time (24 hr format)
  void printHMS(byte hr,
                byte mn,
                byte sec  //time to print
  ) {

    if (hr < 10) {
      lcd.print(" ");
    }
    lcd.print(hr, DEC);
    lcd.print(":");
    if (mn < 10) {
      lcd.print("0");
    }
    lcd.print(mn, DEC);
    lcd.print(":");
    if (sec < 10) {
      lcd.print("0");
    }
    lcd.print(sec, DEC);
  }

  void printDate() {

    // Reset the register pointer
    Wire.beginTransmission(DS1307_I2C_ADDRESS);
    Wire.write(0);
    Wire.endTransmission();

    Wire.requestFrom(DS1307_I2C_ADDRESS, 7);

    int second = bcdToDec(Wire.read());
    int minute = bcdToDec(Wire.read());
    int hour = bcdToDec(Wire.read() & 0b111111);  //24 hour time
    int dayOfWeek = bcdToDec(Wire.read());        //0-6 -> sunday - Saturday
    int dayOfMonth = bcdToDec(Wire.read());
    int month = bcdToDec(Wire.read());
    int year = bcdToDec(Wire.read());

    //print the date EG   3/1/11 23:59:59
    //  lcd.print(dayOfWeek);

    switch (dayOfWeek) {
      case 1:
        lcd.print("Sun");
        break;
      case 2:
        lcd.print("Mon");
        break;
      case 3:
        lcd.print("Tue");
        break;
      case 4:
        lcd.print("Wed");
        break;
      case 5:
        lcd.print("Thu");
        break;
      case 6:
        lcd.print("Fri");
        break;
      case 7:
        lcd.print("Sat");
        break;
    }

    lcd.print(" ");
    if (dayOfMonth < 10) {
      lcd.print("0");
    }
    lcd.print(dayOfMonth);
    lcd.print("/");
    if (month < 10) {
      lcd.print("0");
    }
    lcd.print(month);
    lcd.print("/20");
    if (year < 10) {
      lcd.print("0");
    }
    lcd.print(year);
  }


  /**** Setup ****/
  /***************/ void setup() {
    Wire.begin();
    pinMode(bkl, OUTPUT);
    lcd.begin(16, 2);
    digitalWrite(bkl, HIGH);
    lcd.print("Typhon-Reef");
    lcd.setCursor(0, 1);
    lcd.print("");
    delay(5000);
    lcd.clear();
    analogWrite(bkl, bklIdle);
    btnCurrIteration = btnMaxIteration;
  }

  /***** Loop *****/
  /****************/ void loop() {
    byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
    getDate(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
    oldMinCounter = minCounter;
    minCounter = hour * 60 + minute;

    //reset plus & minus acceleration counters if the button's state has changed
    if (plus.stateChanged()) {
      btnCurrDelay(btnMaxIteration);
    }
    if (minus.stateChanged()) {
      btnCurrDelay(btnMaxIteration);
    }



    //check & set any time functions


    //set outputs
    if (!override) {
      oneVal = setLed(minCounter, oneLed, oneStartMins, onePhotoPeriod);

      else {
        ovrSetAll(overpercent);
      }


      //turn the backlight off and reset the menu if the idle time has elapsed
      if (bklTime + bklDelay < millis() && bklTime > 0) {
        analogWrite(bkl, bklIdle);
        menuCount = 1;
        lcd.clear();
        bklTime = 0;
      }


      //iterate through the menus
      if (menu.uniquePress()) {
        analogWrite(bkl, bklOn);
        bklTime = millis();
        if (menuCount < 6) {
          menuCount++;
        } else {
          menuCount = 1;
        }
        lcd.clear();
      }
      if (menuCount == 1) {
        //main screen turn on!!!
        if (minCounter > oldMinCounter) {
          lcd.clear();
        }
        lcd.setCursor(0, 0);
        printHMS(hour, minute, second);
        lcd.setCursor(0, 1);
        lcd.print(oneVal);
        lcd.setCursor(4, 1);
        lcd.print(twoVal);
        lcd.setCursor(8, 1);
        lcd.print(threeVal);
        lcd.setCursor(12, 1);
        lcd.print(fourVal);


        //debugging function to use the select button to advance the timer by 1 minute
        //if(select.uniquePress()){setDate(second, minute+1, hour, dayOfWeek, dayOfMonth, month, year);}
      }

      if (menuCount == 2) {
        //Manual Override Menu
        lcd.setCursor(0, 0);
        lcd.print("Manual Overrides");
        lcd.setCursor(0, 1);
        lcd.print("All: ");
        if (select.uniquePress()) {
          if (menuSelect < 3) {
            menuSelect++;
          } else {
            menuSelect = 0;
          }
          bklTime = millis();
        }

        if (menuSelect == 0) {
          lcd.print("Timer");
          override = false;
        }
        if (menuSelect == 1) {
          lcd.print("ON   ");
          overpercent = 100;
          override = true;
        }
        if (menuSelect == 2) {
          lcd.print("OFF  ");
          overpercent = 0;
          override = true;
        }
        if (menuSelect == 3) {
          override = true;
          lcd.print(overpercent, DEC);
          lcd.print("%  ");
          if (plus.isPressed() && overpercent < 100) {
            overpercent++;
            delay(btnCurrDelay(btnCurrIteration - 1));
            bklTime = millis();
          }

          if (minus.isPressed() && overpercent > 0) {
            overpercent--;
            delay(btnCurrDelay(btnCurrIteration - 1));
            bklTime = millis();
          }
        }
      }


      if (menuCount == 3) {
        //set start time for channel one
        lcd.setCursor(0, 0);
        lcd.print("Channel 1 Start");
        lcd.setCursor(0, 1);
        printMins(oneStartMins, true);

        if (plus.isPressed() && oneStartMins < 1440) {
          oneStartMins++;
          if (onePhotoPeriod > 0) {
            onePhotoPeriod--;
          } else {
            onePhotoPeriod = 1439;
          }
          delay(btnCurrDelay(btnCurrIteration - 1));
          bklTime = millis();
        }
        if (minus.isPressed() && oneStartMins > 0) {
          oneStartMins--;
          if (onePhotoPeriod < 1439) {
            onePhotoPeriod++;
          } else {
            onePhotoPeriod = 0;
          }
          delay(btnCurrDelay(btnCurrIteration - 1));
          bklTime = millis();
        }
      }
      if (menuCount == 4) {
        //set end time for channel one
        lcd.setCursor(0, 0);
        lcd.print("Channel 1 End");
        lcd.setCursor(0, 1);
        printMins(oneStartMins + onePhotoPeriod, true);
        if (plus.isPressed()) {
          if (onePhotoPeriod < 1439) {
            onePhotoPeriod++;
          } else {
            onePhotoPeriod = 0;
          }
          delay(btnCurrDelay(btnCurrIteration - 1));
          bklTime = millis();
        }
        if (minus.isPressed()) {
          if (onePhotoPeriod > 0) {
            onePhotoPeriod--;
          } else {
            onePhotoPeriod = 1439;
          }
          delay(btnCurrDelay(btnCurrIteration - 1));
          bklTime = millis();
        }
      }

      if (menuCount == 5) {
        //set hours
        lcd.setCursor(0, 0);
        lcd.print("Set Time: Hrs");
        lcd.setCursor(0, 1);
        printHMS(hour, minute, second);
        if (plus.isPressed() && hour < 23) {
          hour++;
          delay(btnCurrDelay(btnCurrIteration - 1));
          bklTime = millis();
        }
        if (minus.isPressed() && hour > 0) {
          hour--;
          delay(btnCurrDelay(btnCurrIteration - 1));
          bklTime = millis();
        }
        setDate(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
      }

      if (menuCount == 6) {
        //set minutes
        lcd.setCursor(0, 0);
        lcd.print("Set Time: Mins");
        lcd.setCursor(0, 1);
        printHMS(hour, minute, second);
        if (plus.isPressed() && minute < 59) {
          minute++;
          delay(btnCurrDelay(btnCurrIteration - 1));
          bklTime = millis();
        }
        if (minus.isPressed() && minute > 0) {
          minute--;
          delay(btnCurrDelay(btnCurrIteration - 1));
          bklTime = millis();
        }
        setDate(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
      }
    }

Now, I'm left with just a few errors...

C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:83:7: error: expected constructor, destructor, or type conversion before 'decToBcd'
 
       ^       
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:89:3: error: expected constructor, destructor, or type conversion before 'decToBcd'
   decToBcd(byte val) {
   ^~~~~~~~
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino: In function 'void setDate(byte, byte, byte, byte, byte, byte, byte)':
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:107:14: error: 'decToBcd' was not declared in this scope
   Wire.write(decToBcd(second));
              ^~~~~~~~
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:107:14: note: suggested alternative: 'second'
   Wire.write(decToBcd(second));
              ^~~~~~~~
              second
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino: In function 'int setLed(int, int, int, int, int, int, boolean)':
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:166:31: error: a function-definition is not allowed here before '{' token
   int btnCurrDelay(byte curr) {
                               ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:181:5: error: a function-definition is not allowed here before '{' token
   ) {
     ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:199:5: error: a function-definition is not allowed here before '{' token
   ) {
     ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:217:20: error: a function-definition is not allowed here before '{' token
   void printDate() {
                    ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:280:34: error: a function-definition is not allowed here before '{' token
   /***************/ void setup() {
                                  ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:295:34: error: a function-definition is not allowed here before '{' token
   /****************/ void loop() {
                                  ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:503:5: error: expected '}' at end of input
     }
     ^

exit status 1

Compilation error: expected constructor, destructor, or type conversion before 'decToBcd'

Maybe some help here?

Thanks John, I'll take a look at that later tonight. I wasn't sure what a 'constructor, destructor or type conversion' meant.

Edit: In this thread, it seemed like it was just a matter of unequal { characters. I was hoping it was something as simple as that.

OK... it seems it may be due to extra characters after all. The decToBcd error was due to an extra "*" before the function heading...

*  //****** RTC Functions ******/
  /***************************/

  // Convert decimal numbers to binary coded decimal
  byte
  decToBcd(byte val) {
  return ((val / 10 * 16) + (val % 10));
}  // Convert binary coded decimal to decimal numbers
byte bcdToDec(byte val) {
  return ((val / 16 * 10) + (val % 16));
}

Needed to be....

  //****** RTC Functions ******/
  /***************************/

  // Convert decimal numbers to binary coded decimal
  byte
  decToBcd(byte val) {
  return ((val / 10 * 16) + (val % 10));
}  // Convert binary coded decimal to decimal numbers
byte bcdToDec(byte val) {
  return ((val / 16 * 10) + (val % 16));
}

Now it doesn't give the decToBcd error anymore. At least not in the RTC Functions section of the sketch. I'm now getting the error lower down in the Display Functions section...

C:\Users\bmich\Downloads\typhon\typhon\typhon.ino: In function 'int setLed(int, int, int, int, int, int, boolean)':
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:166:31: error: a function-definition is not allowed here before '{' token
   int btnCurrDelay(byte curr) {
                               ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:181:5: error: a function-definition is not allowed here before '{' token
   ) {
     ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:199:5: error: a function-definition is not allowed here before '{' token
   ) {
     ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:217:20: error: a function-definition is not allowed here before '{' token
   void printDate() {
                    ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:280:34: error: a function-definition is not allowed here before '{' token
   /***************/ void setup() {
                                  ^
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:295:34: error: a function-definition is not allowed here before '{' token
   /****************/ void loop() {
                                  ^

exit status 1

Compilation error: a function-definition is not allowed here before '{' token

I'm getting there. :upside_down_face:

Well, now I'm down to a single error, but I'm not sure what needs changing...

C:\Users\bmich\Downloads\typhon\typhon\typhon.ino: In function 'int setLed(int, int, int, int, int, int, boolean)':
C:\Users\bmich\Downloads\typhon\typhon\typhon.ino:165:31: error: a function-definition is not allowed here before '{' token
   int btnCurrDelay(byte curr) {
                               ^

exit status 1

Compilation error: a function-definition is not allowed here before '{' token
/*
// Typhon firmware
// v0.3 alpha 2011-16-11
// N. Enders, R. Ensminger
//
// This sketch provides firmware for the Typhon LED controller.
// It provides a structure to fade 4 independent channels of LED lighting
// on and off each day, to simulate sunrise and sunset.
//
// Current work in progress:
// - store all LED variables in EEPROM so they are not reset by a loss of power
// - allow for signals to be inverted for buckpucks or other drivers that consider 0 to be "on"
//
// Future developments may include:
// - moon phase simulation
// - storm simulation
// - support for plugin hardware modules for temperature, pH, relay control, etc.
//
// Sketch developed in Arduino-22
// Requires LiquidCrystal, Wire, EEPROM, EEPROMVar, and Button libraries.
// Button is available here: http://www.arduino.cc/playground/Code/Button
// EEPROMVar is available here: http://www.arduino.cc/playground/uploads/Profiles/EEPROMVar_01.zip
*/

// include the libraries:
#include <LiquidCrystal.h>
#include <Wire.h>
#include <Button.h>
#include <EEPROM.h>
//#include <EEPROMVar.h>

/**** Define Variables & Constants ****/
/**************************************/

// set the RTC's I2C address
#define DS1307_I2C_ADDRESS 0x68

// create the LCD
LiquidCrystal lcd(8, 7, 5, 4, 16, 2);

// set up backlight
int bkl = 6;                // backlight pin
byte bklIdle = 10;          // PWM value for backlight at idle
byte bklOn = 70;            // PWM value for backlight when on
int bklDelay = 10000;       // ms for the backlight to idle before turning off
unsigned long bklTime = 0;  // counter since backlight turned on

// create the menu counter
int menuCount = 1;
int menuSelect = 0;

//create the plus and minus navigation delay counter with its initial maximum of 250.
byte btnMaxDelay = 200;
byte btnMinDelay = 25;
byte btnMaxIteration = 5;
byte btnCurrIteration;

//create manual override variables
boolean override = false;
byte overmenu = 0;
int overpercent = 0;

// create the buttons
Button menu = Button(12);
Button select = Button(13);
Button plus = Button(14);
Button minus = Button(15);

// LED variables. These control the behavior of lighting. Change these to customize behavoir
int minCounter = 0;     // counter that resets at midnight.
int oldMinCounter = 0;  // counter that resets at midnight.
int oneLed = 9;         // pin for channel 1
int oneVal = 0;         // current value for channel 1


// Variables making use of EEPROM memory:
//EEPROMVar<int> oneStartMins = 750;      // minute to start this channel.
//EEPROMVar<int> onePhotoPeriod = 720;   // photoperiod in minutes for this channel.

const int oneStartMins = 750;    // minute to start this channel.
const int onePhotoPeriod = 720;  // photoperiod in minutes for this channel.


//****** RTC Functions ******/
/***************************/

// Convert decimal numbers to binary coded decimal
byte decToBcd(byte val) {
  return ((val / 10 * 16) + (val % 10));
}  // Convert binary coded decimal to decimal numbers
byte bcdToDec(byte val) {
  return ((val / 16 * 10) + (val % 16));
}

// Sets date and time, starts the clock
void setDate(byte second,      // 0-59
             byte minute,      // 0-59
             byte hour,        // 1-23
             byte dayOfWeek,   // 1-7
             byte dayOfMonth,  // 1-31
             byte month,       // 1-12
             byte year)        // 0-99
{
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.write(0);
  Wire.write(decToBcd(second));
  Wire.write(decToBcd(minute));
  Wire.write(decToBcd(hour));
  Wire.write(decToBcd(dayOfWeek));
  Wire.write(decToBcd(dayOfMonth));
  Wire.write(decToBcd(month));
  Wire.write(decToBcd(year));
  Wire.endTransmission();
}

// Gets the date and time
void getDate(byte *second,
             byte *minute,
             byte *hour,
             byte *dayOfWeek,
             byte *dayOfMonth,
             byte *month,
             byte *year) {
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.write(0);
  Wire.endTransmission();
  Wire.requestFrom(DS1307_I2C_ADDRESS, 7);
  *second = bcdToDec(Wire.read() & 0x7f);
  *minute = bcdToDec(Wire.read());
  *hour = bcdToDec(Wire.read() & 0x3f);
  *dayOfWeek = bcdToDec(Wire.read());
  *dayOfMonth = bcdToDec(Wire.read());
  *month = bcdToDec(Wire.read());
  *year = bcdToDec(Wire.read());
}

/****** LED Functions ******/
/***************************/

//function to set LED brightness according to time of day
//function has three equal phases - ramp up, hold, and ramp down
int setLed(int mins,         // current time in minutes
           int ledPin,       // pin for this channel of LEDs
           int start,        // start time for this channel of LEDs
           int period,       // photoperiod for this channel of LEDs
           int fade,         // fade duration for this channel of LEDs
           int ledMax,       // max value for this channel
           boolean inverted  // true if the channel is inverted
) {
  int val = 0;

  //off or post-midnight run.
  if (mins <= start || mins > start + period) {
    if ((start + period) % 1440 < start && (start + period) % 1440 > mins) {
      val = map((start + period - mins) % 1440, 0, fade, 0, ledMax);
    } else
      val = 0;
  }


  /**** Display Functions ****/
  /***************************/

  //button hold function
  int btnCurrDelay(byte curr) {
    if (curr == btnMaxIteration) {
      btnCurrIteration = btnMaxIteration;
      return btnMaxDelay;
    } else if (btnCurrIteration == 0) {
      return btnMinDelay;
    } else {
      btnCurrIteration--;
      return btnMaxDelay;
    }


    // format a number of minutes into a readable time (24 hr format)
    void printMins(int mins,     //time in minutes to print
                   boolean ampm  //print am/pm?
                   ) int hr = (mins % 1440) / 60;
    int mn = mins % 60;
    if (hr < 10) {
      lcd.print(" ");
    }
    lcd.print(hr);
    lcd.print(":");
    if (mn < 10) {
      lcd.print("0");
    }
    lcd.print(mn);


    // format hours, mins, secs into a readable time (24 hr format)
    void printHMS(byte hr,
                  byte mn,
                  byte sec  //time to print
    ) {

      if (hr < 10) {
        lcd.print(" ");
      }
      lcd.print(hr, DEC);
      lcd.print(":");
      if (mn < 10) {
        lcd.print("0");
      }
      lcd.print(mn, DEC);
      lcd.print(":");
      if (sec < 10) {
        lcd.print("0");
      }
      lcd.print(sec, DEC);
    }

    void printDate() {

      // Reset the register pointer
      Wire.beginTransmission(DS1307_I2C_ADDRESS);
      Wire.write(0);
      Wire.endTransmission();

      Wire.requestFrom(DS1307_I2C_ADDRESS, 7);

      int second = bcdToDec(Wire.read());
      int minute = bcdToDec(Wire.read());
      int hour = bcdToDec(Wire.read() & 0b111111);  //24 hour time
      int dayOfWeek = bcdToDec(Wire.read());        //0-6 -> sunday - Saturday
      int dayOfMonth = bcdToDec(Wire.read());
      int month = bcdToDec(Wire.read());
      int year = bcdToDec(Wire.read());

      //print the date EG   3/1/11 23:59:59
      //  lcd.print(dayOfWeek);

      switch (dayOfWeek) {
        case 1:
          lcd.print("Sun");
          break;
        case 2:
          lcd.print("Mon");
          break;
        case 3:
          lcd.print("Tue");
          break;
        case 4:
          lcd.print("Wed");
          break;
        case 5:
          lcd.print("Thu");
          break;
        case 6:
          lcd.print("Fri");
          break;
        case 7:
          lcd.print("Sat");
          break;
      }

      lcd.print(" ");
      if (dayOfMonth < 10) {
        lcd.print("0");
      }
      lcd.print(dayOfMonth);
      lcd.print("/");
      if (month < 10) {
        lcd.print("0");
      }
      lcd.print(month);
      lcd.print("/20");
      if (year < 10) {
        lcd.print("0");
      }
      lcd.print(year);
    }


    /**** Setup ****/
    /***************/ void setup() {
      Wire.begin();
      pinMode(bkl, OUTPUT);
      lcd.begin(16, 2);
      digitalWrite(bkl, HIGH);
      lcd.print("Typhon-Reef");
      lcd.setCursor(0, 1);
      lcd.print("");
      delay(5000);
      lcd.clear();
      analogWrite(bkl, bklIdle);
      btnCurrIteration = btnMaxIteration;
    }

    /***** Loop *****/
    /****************/ void loop() {
      byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
      getDate(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
      oldMinCounter = minCounter;
      minCounter = hour * 60 + minute;

      //reset plus & minus acceleration counters if the button's state has changed
      if (plus.stateChanged()) {
        btnCurrDelay(btnMaxIteration);
      }
      if (minus.stateChanged()) {
        btnCurrDelay(btnMaxIteration);
      }



      //check & set any time functions


      //set outputs
      if (!override) {
        oneVal = setLed(minCounter, oneLed, oneStartMins, onePhotoPeriod);

        else {
          ovrSetAll(overpercent);
        }


        //turn the backlight off and reset the menu if the idle time has elapsed
        if (bklTime + bklDelay < millis() && bklTime > 0) {
          analogWrite(bkl, bklIdle);
          menuCount = 1;
          lcd.clear();
          bklTime = 0;
        }


        //iterate through the menus
        if (menu.uniquePress()) {
          analogWrite(bkl, bklOn);
          bklTime = millis();
          if (menuCount < 6) {
            menuCount++;
          } else {
            menuCount = 1;
          }
          lcd.clear();
        }
        if (menuCount == 1) {
          //main screen turn on!!!
          if (minCounter > oldMinCounter) {
            lcd.clear();
          }
          lcd.setCursor(0, 0);
          printHMS(hour, minute, second);
          lcd.setCursor(0, 1);
          lcd.print(oneVal);
          lcd.setCursor(4, 1);
          lcd.print(twoVal);
          lcd.setCursor(8, 1);
          lcd.print(threeVal);
          lcd.setCursor(12, 1);
          lcd.print(fourVal);


          //debugging function to use the select button to advance the timer by 1 minute
          //if(select.uniquePress()){setDate(second, minute+1, hour, dayOfWeek, dayOfMonth, month, year);}
        }

        if (menuCount == 2) {
          //Manual Override Menu
          lcd.setCursor(0, 0);
          lcd.print("Manual Overrides");
          lcd.setCursor(0, 1);
          lcd.print("All: ");
          if (select.uniquePress()) {
            if (menuSelect < 3) {
              menuSelect++;
            } else {
              menuSelect = 0;
            }
            bklTime = millis();
          }

          if (menuSelect == 0) {
            lcd.print("Timer");
            override = false;
          }
          if (menuSelect == 1) {
            lcd.print("ON   ");
            overpercent = 100;
            override = true;
          }
          if (menuSelect == 2) {
            lcd.print("OFF  ");
            overpercent = 0;
            override = true;
          }
          if (menuSelect == 3) {
            override = true;
            lcd.print(overpercent, DEC);
            lcd.print("%  ");
            if (plus.isPressed() && overpercent < 100) {
              overpercent++;
              delay(btnCurrDelay(btnCurrIteration - 1));
              bklTime = millis();
            }

            if (minus.isPressed() && overpercent > 0) {
              overpercent--;
              delay(btnCurrDelay(btnCurrIteration - 1));
              bklTime = millis();
            }
          }
        }


        if (menuCount == 3) {
          //set start time for channel one
          lcd.setCursor(0, 0);
          lcd.print("Channel 1 Start");
          lcd.setCursor(0, 1);
          printMins(oneStartMins, true);

          if (plus.isPressed() && oneStartMins < 1440) {
            oneStartMins++;
            if (onePhotoPeriod > 0) {
              onePhotoPeriod--;
            } else {
              onePhotoPeriod = 1439;
            }
            delay(btnCurrDelay(btnCurrIteration - 1));
            bklTime = millis();
          }
          if (minus.isPressed() && oneStartMins > 0) {
            oneStartMins--;
            if (onePhotoPeriod < 1439) {
              onePhotoPeriod++;
            } else {
              onePhotoPeriod = 0;
            }
            delay(btnCurrDelay(btnCurrIteration - 1));
            bklTime = millis();
          }
        }
        if (menuCount == 4) {
          //set end time for channel one
          lcd.setCursor(0, 0);
          lcd.print("Channel 1 End");
          lcd.setCursor(0, 1);
          printMins(oneStartMins + onePhotoPeriod, true);
          if (plus.isPressed()) {
            if (onePhotoPeriod < 1439) {
              onePhotoPeriod++;
            } else {
              onePhotoPeriod = 0;
            }
            delay(btnCurrDelay(btnCurrIteration - 1));
            bklTime = millis();
          }
          if (minus.isPressed()) {
            if (onePhotoPeriod > 0) {
              onePhotoPeriod--;
            } else {
              onePhotoPeriod = 1439;
            }
            delay(btnCurrDelay(btnCurrIteration - 1));
            bklTime = millis();
          }
        }

        if (menuCount == 5) {
          //set hours
          lcd.setCursor(0, 0);
          lcd.print("Set Time: Hrs");
          lcd.setCursor(0, 1);
          printHMS(hour, minute, second);
          if (plus.isPressed() && hour < 23) {
            hour++;
            delay(btnCurrDelay(btnCurrIteration - 1));
            bklTime = millis();
          }
          if (minus.isPressed() && hour > 0) {
            hour--;
            delay(btnCurrDelay(btnCurrIteration - 1));
            bklTime = millis();
          }
          setDate(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
        }

        if (menuCount == 6) {
          //set minutes
          lcd.setCursor(0, 0);
          lcd.print("Set Time: Mins");
          lcd.setCursor(0, 1);
          printHMS(hour, minute, second);
          if (plus.isPressed() && minute < 59) {
            minute++;
            delay(btnCurrDelay(btnCurrIteration - 1));
            bklTime = millis();
          }
          if (minus.isPressed() && minute > 0) {
            minute--;
            delay(btnCurrDelay(btnCurrIteration - 1));
            bklTime = millis();
          }
          setDate(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
        }
      }
    }
  }
}

Your setLed() does not have a closing }. Same for your btnCurrDelay() function.

Use tools -> autoformat in the IDE. Function definitions should start at the far left.

The function printMins() is missing an opening { and closing }.

After that there are new problems; it's too early for me to look into that.

Thank you very much. I have been using the autoformat function, but when I found missing closing }, I added to the bottom. Obviously not the right thing to do. I'm not a coder, but I can sometimes modify simple things in a script, but this is being my knowledge. I just can't figure out why it compiled 13 years ago, but not now. I guess library definitions have changed since then. I used to have all the necessary files on a drive, but it died.

Edit: Well, I found the proper Button library anyway. The error was saying stateChanged was wrong, suggesting has_changed instead, but this version uses stateChanged, not has_changed.

Well, I used to alternative Button library as it uses "uniquePress", and the newer library doesn't. But now it's erroring out on something else.

Also, when trying to modify the sketch into a single channel without the fade functions, it seemed to break it. So I added the fade function back in, but just for the single channel still.

C:\Users\bmich\AppData\Local\arduino\sketches\994AF9F71AEE1A30DC95E09C2FF87399\libraries\Button\Button.cpp.o (symbol from plugin): In function `Button::pullup(unsigned char)':
(.text+0x0): multiple definition of `Button::pulldown()'
C:\Users\bmich\AppData\Local\arduino\sketches\994AF9F71AEE1A30DC95E09C2FF87399\sketch\Button.cpp.o (symbol from plugin):(.text+0x0): first defined here
C:\Users\bmich\AppData\Local\arduino\sketches\994AF9F71AEE1A30DC95E09C2FF87399\libraries\Button\Button.cpp.o (symbol from plugin): In function `Button::pullup(unsigned char)':
(.text+0x0): multiple definition of `Button::uniquePress()'
C:\Users\bmich\AppData\Local\arduino\sketches\994AF9F71AEE1A30DC95E09C2FF87399\sketch\Button.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1
/*
// Typhon firmware
// v0.3 alpha 2011-16-11
// N. Enders, R. Ensminger
//
// This sketch provides firmware for the Typhon LED controller.
// It provides a structure to fade 4 independent channels of LED lighting
// on and off each day, to simulate sunrise and sunset.
//
// Current work in progress:
// - store all LED variables in EEPROM so they are not reset by a loss of power
// - allow for signals to be inverted for buckpucks or other drivers that consider 0 to be "on"
//
// Future developments may include:
// - moon phase simulation
// - storm simulation
// - support for plugin hardware modules for temperature, pH, relay control, etc.
//
// Sketch developed in Arduino-22
// Requires LiquidCrystal, Wire, EEPROM, EEPROMVar, and Button libraries.
// Button is available here: http://www.arduino.cc/playground/Code/Button
// EEPROMVar is available here: http://www.arduino.cc/playground/uploads/Profiles/EEPROMVar_01.zip
*/

// include the libraries:
#include <LiquidCrystal.h>
#include <Wire.h>
#include <Button.h>
#include <EEPROM.h>
//#include <EEPROMVar.h>

/**** Define Variables & Constants ****/
/**************************************/

// set the RTC's I2C address
#define DS1307_I2C_ADDRESS 0x68

// create the LCD
LiquidCrystal lcd(8, 7, 5, 4, 16, 2);

// set up backlight
int bkl = 6;                // backlight pin
byte bklIdle = 10;          // PWM value for backlight at idle
byte bklOn = 70;            // PWM value for backlight when on
int bklDelay = 10000;       // ms for the backlight to idle before turning off
unsigned long bklTime = 0;  // counter since backlight turned on

// create the menu counter
int menuCount = 1;
int menuSelect = 0;

//create the plus and minus navigation delay counter with its initial maximum of 250.
byte btnMaxDelay = 200;
byte btnMinDelay = 25;
byte btnMaxIteration = 5;
byte btnCurrIteration;

//create manual override variables
boolean override = false;
byte overmenu = 0;
int overpercent = 0;

// create the buttons
Button menu = Button(12);
Button select = Button(13);
Button plus = Button(14);
Button minus = Button(15);

// LED variables. These control the behavior of lighting. Change these to customize behavoir
int minCounter = 0;     // counter that resets at midnight.
int oldMinCounter = 0;  // counter that resets at midnight.
int oneLed = 3;         // pin for channel 1
int oneVal = 0;         // current value for channel 1
//int twoLed = 5;         // pin for channel 2
//int threeLed = 6;       // pin for channel 3
//int fourLed = 9;        // pin for channel 4


// Variables making use of EEPROM memory:
//EEPROMVar<int> oneStartMins = 750;      // minute to start this channel.
//EEPROMVar<int> onePhotoPeriod = 720;   // photoperiod in minutes for this channel.
boolean oneInverted = false;
int oneStartMins = 750;    // minute to start this channel.
int onePhotoPeriod = 720;  // photoperiod in minutes for this channel.
int oneMax = 100;          // max intensity for this channel, as a percentage
int oneFadeDuration = 60;  // duration of the fade on and off for sunrise and sunset for this channel.

//****** RTC Functions ******/
/***************************/

// Convert decimal numbers to binary coded decimal
byte decToBcd(byte val) {
  return ((val / 10 * 16) + (val % 10));
}  // Convert binary coded decimal to decimal numbers
byte bcdToDec(byte val) {
  return ((val / 16 * 10) + (val % 16));
}

// Sets date and time, starts the clock
void setDate(byte second,      // 0-59
             byte minute,      // 0-59
             byte hour,        // 1-23
             byte dayOfWeek,   // 1-7
             byte dayOfMonth,  // 1-31
             byte month,       // 1-12
             byte year)        // 0-99
{
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.write(0);
  Wire.write(decToBcd(second));
  Wire.write(decToBcd(minute));
  Wire.write(decToBcd(hour));
  Wire.write(decToBcd(dayOfWeek));
  Wire.write(decToBcd(dayOfMonth));
  Wire.write(decToBcd(month));
  Wire.write(decToBcd(year));
  Wire.endTransmission();
}

// Gets the date and time
void getDate(byte *second,
             byte *minute,
             byte *hour,
             byte *dayOfWeek,
             byte *dayOfMonth,
             byte *month,
             byte *year) {
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.write(0);
  Wire.endTransmission();
  Wire.requestFrom(DS1307_I2C_ADDRESS, 7);
  *second = bcdToDec(Wire.read() & 0x7f);
  *minute = bcdToDec(Wire.read());
  *hour = bcdToDec(Wire.read() & 0x3f);
  *dayOfWeek = bcdToDec(Wire.read());
  *dayOfMonth = bcdToDec(Wire.read());
  *month = bcdToDec(Wire.read());
  *year = bcdToDec(Wire.read());
}

/****** LED Functions ******/
/***************************/

//function to set LED brightness according to time of day
//function has three equal phases - ramp up, hold, and ramp down
int setLed(int mins,         // current time in minutes
           int ledPin,       // pin for this channel of LEDs
           int start,        // start time for this channel of LEDs
           int period,       // photoperiod for this channel of LEDs
           int fade,         // fade duration for this channel of LEDs
           int ledMax,       // max value for this channel
           boolean inverted  // true if the channel is inverted
) {
  int val = 0;

  //off or post-midnight run.
  if (mins <= start || mins > start + period) {
    if ((start + period) % 1440 < start && (start + period) % 1440 > mins) {
      val = map((start + period - mins) % 1440, 0, fade, 0, ledMax);
    } else
      val = 0;
  }
}

/**** Display Functions ****/
/***************************/

//button hold function
int btnCurrDelay(byte curr) {
  if (curr == btnMaxIteration) {
    btnCurrIteration = btnMaxIteration;
    return btnMaxDelay;
  } else if (btnCurrIteration == 0) {
    return btnMinDelay;
  } else {
    btnCurrIteration--;
    return btnMaxDelay;
  }
}

// format a number of minutes into a readable time (24 hr format)
void printMins(int mins,     //time in minutes to print
               boolean ampm  //print am/pm?
) {
  int hr = (mins % 1440) / 60;
  int mn = mins % 60;

  if (hr < 10) {
    lcd.print(" ");
  }
  lcd.print(hr);
  lcd.print(":");
  if (mn < 10) {
    lcd.print("0");
  }
  lcd.print(mn);
}

// format hours, mins, secs into a readable time (24 hr format)
void printHMS(byte hr,
              byte mn,
              byte sec  //time to print
) {

  if (hr < 10) {
    lcd.print(" ");
  }
  lcd.print(hr, DEC);
  lcd.print(":");
  if (mn < 10) {
    lcd.print("0");
  }
  lcd.print(mn, DEC);
  lcd.print(":");
  if (sec < 10) {
    lcd.print("0");
  }
  lcd.print(sec, DEC);
}

void printDate() {

  // Reset the register pointer
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.write(0);
  Wire.endTransmission();

  Wire.requestFrom(DS1307_I2C_ADDRESS, 7);

  int second = bcdToDec(Wire.read());
  int minute = bcdToDec(Wire.read());
  int hour = bcdToDec(Wire.read() & 0b111111);  //24 hour time
  int dayOfWeek = bcdToDec(Wire.read());        //0-6 -> sunday - Saturday
  int dayOfMonth = bcdToDec(Wire.read());
  int month = bcdToDec(Wire.read());
  int year = bcdToDec(Wire.read());

  //print the date EG   3/1/11 23:59:59
  //  lcd.print(dayOfWeek);

  switch (dayOfWeek) {
    case 1:
      lcd.print("Sun");
      break;
    case 2:
      lcd.print("Mon");
      break;
    case 3:
      lcd.print("Tue");
      break;
    case 4:
      lcd.print("Wed");
      break;
    case 5:
      lcd.print("Thu");
      break;
    case 6:
      lcd.print("Fri");
      break;
    case 7:
      lcd.print("Sat");
      break;
  }

  lcd.print(" ");
  if (dayOfMonth < 10) {
    lcd.print("0");
  }
  lcd.print(dayOfMonth);
  lcd.print("/");
  if (month < 10) {
    lcd.print("0");
  }
  lcd.print(month);
  lcd.print("/20");
  if (year < 10) {
    lcd.print("0");
  }
  lcd.print(year);
}

void ovrSetAll(int pct){
	analogWrite(oneLed,map(pct,0,100,0,255));
}

/**** Setup ****/
/***************/ void setup() {
  Wire.begin();
  pinMode(bkl, OUTPUT);
  lcd.begin(16, 2);
  digitalWrite(bkl, HIGH);
  lcd.print("Typhon-Reef");
  lcd.setCursor(0, 1);
  lcd.print("");
  delay(5000);
  lcd.clear();
  analogWrite(bkl, bklIdle);
  btnCurrIteration = btnMaxIteration;
}

/***** Loop *****/
/****************/ void loop() {
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
  getDate(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
  oldMinCounter = minCounter;
  minCounter = hour * 60 + minute;

  //reset plus & minus acceleration counters if the button's state has changed
  if (plus.stateChanged()) {
    btnCurrDelay(btnMaxIteration);
  }
  if (minus.stateChanged()) {
    btnCurrDelay(btnMaxIteration);
  }



  //check & set any time functions


  //set outputs
  if (!override) {
    oneVal = setLed(minCounter, oneLed, oneStartMins, onePhotoPeriod, oneFadeDuration, oneMax, oneInverted);
  } else {
    ovrSetAll(overpercent);
  }


  //turn the backlight off and reset the menu if the idle time has elapsed
  if (bklTime + bklDelay < millis() && bklTime > 0) {
    analogWrite(bkl, bklIdle);
    menuCount = 1;
    lcd.clear();
    bklTime = 0;
  }


  //iterate through the menus
  if (menu.uniquePress()) {
    analogWrite(bkl, bklOn);
    bklTime = millis();
    if (menuCount < 6) {
      menuCount++;
    } else {
      menuCount = 1;
    }
    lcd.clear();
  }
  if (menuCount == 1) {
    //main screen turn on!!!
    if (minCounter > oldMinCounter) {
      lcd.clear();
    }
    lcd.setCursor(0, 0);
    printHMS(hour, minute, second);
    lcd.setCursor(0, 1);
    lcd.print(oneVal);


    //debugging function to use the select button to advance the timer by 1 minute
    //if(select.uniquePress()){setDate(second, minute+1, hour, dayOfWeek, dayOfMonth, month, year);}
  }

  if (menuCount == 2) {
    //Manual Override Menu
    lcd.setCursor(0, 0);
    lcd.print("Manual Overrides");
    lcd.setCursor(0, 1);
    lcd.print("All: ");
    if (select.uniquePress()) {
      if (menuSelect < 3) {
        menuSelect++;
      } else {
        menuSelect = 0;
      }
      bklTime = millis();
    }

    if (menuSelect == 0) {
      lcd.print("Timer");
      override = false;
    }
    if (menuSelect == 1) {
      lcd.print("ON   ");
      overpercent = 100;
      override = true;
    }
    if (menuSelect == 2) {
      lcd.print("OFF  ");
      overpercent = 0;
      override = true;
    }
    if (menuSelect == 3) {
      override = true;
      lcd.print(overpercent, DEC);
      lcd.print("%  ");
      if (plus.isPressed() && overpercent < 100) {
        overpercent++;
        delay(btnCurrDelay(btnCurrIteration - 1));
        bklTime = millis();
      }

      if (minus.isPressed() && overpercent > 0) {
        overpercent--;
        delay(btnCurrDelay(btnCurrIteration - 1));
        bklTime = millis();
      }
    }
  }


  if (menuCount == 3) {
    //set start time for channel one
    lcd.setCursor(0, 0);
    lcd.print("Channel 1 Start");
    lcd.setCursor(0, 1);
    printMins(oneStartMins, true);

    if (plus.isPressed() && oneStartMins < 1440) {
      oneStartMins++;
      if (onePhotoPeriod > 0) {
        onePhotoPeriod--;
      } else {
        onePhotoPeriod = 1439;
      }
      delay(btnCurrDelay(btnCurrIteration - 1));
      bklTime = millis();
    }
    if (minus.isPressed() && oneStartMins > 0) {
      oneStartMins--;
      if (onePhotoPeriod < 1439) {
        onePhotoPeriod++;
      } else {
        onePhotoPeriod = 0;
      }
      delay(btnCurrDelay(btnCurrIteration - 1));
      bklTime = millis();
    }
  }
  if (menuCount == 4) {
    //set end time for channel one
    lcd.setCursor(0, 0);
    lcd.print("Channel 1 End");
    lcd.setCursor(0, 1);
    printMins(oneStartMins + onePhotoPeriod, true);
    if (plus.isPressed()) {
      if (onePhotoPeriod < 1439) {
        onePhotoPeriod++;
      } else {
        onePhotoPeriod = 0;
      }
      delay(btnCurrDelay(btnCurrIteration - 1));
      bklTime = millis();
    }
    if (minus.isPressed()) {
      if (onePhotoPeriod > 0) {
        onePhotoPeriod--;
      } else {
        onePhotoPeriod = 1439;
      }
      delay(btnCurrDelay(btnCurrIteration - 1));
      bklTime = millis();
    }
  }

  if (menuCount == 5) {
    //set hours
    lcd.setCursor(0, 0);
    lcd.print("Set Time: Hrs");
    lcd.setCursor(0, 1);
    printHMS(hour, minute, second);
    if (plus.isPressed() && hour < 23) {
      hour++;
      delay(btnCurrDelay(btnCurrIteration - 1));
      bklTime = millis();
    }
    if (minus.isPressed() && hour > 0) {
      hour--;
      delay(btnCurrDelay(btnCurrIteration - 1));
      bklTime = millis();
    }
    setDate(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
  }

  if (menuCount == 6) {
    //set minutes
    lcd.setCursor(0, 0);
    lcd.print("Set Time: Mins");
    lcd.setCursor(0, 1);
    printHMS(hour, minute, second);
    if (plus.isPressed() && minute < 59) {
      minute++;
      delay(btnCurrDelay(btnCurrIteration - 1));
      bklTime = millis();
    }
    if (minus.isPressed() && minute > 0) {
      minute--;
      delay(btnCurrDelay(btnCurrIteration - 1));
      bklTime = millis();
    }
    setDate(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
  }
}

The sketch of post #12 compiles here without problems.

It looks like you have two Button classes.

  1. Button\Button.cpp
  2. sketch\Button.cpp (and possibly other associated files)

Delete the one that you don't need; I can't look at your system as to what you have tried but I suspect that the second one is not needed.

It compiles?? What version are you using?

A portable install of IDE 1.8.19 for this test but it does not matter. I did not use IDE 2.x because I use a different button library in it and I don't want to change my libraries.

Please see my comments about the multiple classes. As said, I do not know what you tried but you probably copied two files into your sketch directory and your sketch now consists of 3 (or more files). Those files plus the libraries that you have included are compiled without a problem. After compiling, everything that was compiled is linked and that is where it fails; the linker finds two Button classes that are similar (or the same) and does not know which one you want to use.

Can you post a full-screen screenshot of the IDE with your project open, In case you don't know how to post a screenshot

  1. <alt><PrintScreen>
  2. Paste in a reply

What is libraries\Button\? The library that you want to use? Is that indeed the library that you provided the link for in post #11?

Crap... I just deleted everything to do with Arduino in my system to make sure of a clean install. I'll try 1.8.19. Cheers.

You don't have to use 1.8.19. It's no longer officially supported; I used it because it offers portable installations so it does not interfere with my IDE 2.x.

Supported or not, it actually worked! I initially installed the Button library from the menu that popped up, but it started giving issues, so I replaced it with the one from Github. After that... it compiled without issues. Happy happy, joy joy. :upside_down_face:

Now to test that it actually works though. :yum:

Cheers, and thank you very much! :smiley:

Well, after all that... I just found a thread on a grow forum with a modified version of the original script that includes code for the DHT11 temperature and humidity sensor, and it uses the EEPROMVar.h, like the original script, but it compiles just fine. The original was from 2012, and it required http://www.arduino.cc/playground/uploads/Profiles/EEPROMVar_01.zip, but that link is now dead. Or at least the file is. The modified script seems to be using EEPROMEx, which has EEPROMVar.h included. But even though it works with the modified script, it still errors out on the original. So, my guess is there's a difference between the older EEPROMVar.h and the newer one included in EEPROMEx. I wish I found that earlier... the original script structure is so much easier for me to work with than the last version I tested just using EEPROM. :stuck_out_tongue:

#include <Wire.h>
#include <EEPROMVar.h>
#include <Adafruit_RGBLCDShield.h>
#include <utility/Adafruit_MCP23017.h>
//#include <dht11.h>  
// setup DHT for use
//dht11 DHT;
// DHT data  pin
#define DHT11_PIN 0 // ADC0 for Uno
int DHT11Temp = 0;
int DHT11Hum = 0;
/* completed 6/23/16 executes the menu system, display date, time, 
temperature and humidity and runs throuhg screens and loops correctly.
define some values used by the panel and buttons
 readButton for each function */
 // The shield uses the I2C SCL and SDA pins. On classic Arduinos
// this is Analog 4 and 5 so you can't use those for analogRead() anymore
// However, you can connect other I2C sensors to the I2C bus and share
// the I2C bus.
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
// set up backlight
int bklDelay    = 100000;    // ms for the backlight to idle before turning off
unsigned long bklTime = 0;  // counter since backlight turned on
// create the menu counter
int menuCount   = 1;
int menuSelect = 0;

//create the plus and minus navigation delay counter with its initial maximum of 250.
byte btnMaxDelay = 200;
byte btnMinDelay = 25;
byte btnMaxIteration = 5;
byte btnCurrIteration;
// setup[ ds1307  Real Time Clock using i2c address direct
#define DS1307_I2C_ADDRESS 0x68
// backlight on/off
#define ON 0x1
#define OFF 0x0
// lcd screen variable
int LCD_R=16;  // lcd rows
int LCD_C=2;  // lcd columns
// establish temperature humidity pin on A0
//create manual override variables
boolean override = false;
byte overmenu = 0;
int overpercent = 0;
// button read variables for lcd shield
uint8_t i=0;
uint8_t buttons =0;
//------------------- system variables-----------------------//
int minCounter = 0;         // counter that resets at midnight.
int oldMinCounter = 0;      // counter that resets at midnight.
int oneLed = 9;             // pin for channel 1
int twoLed = 10;            // pin for channel 2
int threeLed = 11;          // pin for channel 3
int fourLed = 5;            // pin for channel 4
int fiveLed = 6;            // pin for channel 5
int sixLed = 7;             // pin for channel 6
int oneVal = 0;             // current value for channel 1
int twoVal = 0;             // current value for channel 2
int threeVal = 0;           // current value for channel 3
int fourVal = 0;            // current value for channel 4
int fiveVal = 0;            // current value for channel 5
int sixVal = 0;             // current value for channel 6
// dht11 data variables for printing temp in farhenheit or celcius
int dhtFTemp=0;
int dhtCTemp=0;
int dhtHumidity=0;
double dhtDTemp=0;
double dhtDHumidity=0;
// Variables making use of EEPROM memory:
EEPROMVar<int> oneStartMins = 360;      // minute to start this channel.
EEPROMVar<int> onePhotoPeriod = 720;   // photoperiod in minutes for this channel.
EEPROMVar<int> oneMax = 100;           // max intensity for this channel, as a percentage
EEPROMVar<int> oneFadeDuration = 60;   // duration of the fade on and off for sunrise and sunset for
                                       //    this channel.
EEPROMVar<int> twoStartMins = 360;  //  6:am
EEPROMVar<int> twoPhotoPeriod = 720; //
EEPROMVar<int> twoMax = 100;
EEPROMVar<int> twoFadeDuration = 60;

EEPROMVar<int> threeStartMins = 360;
EEPROMVar<int> threePhotoPeriod = 720;
EEPROMVar<int> threeMax = 100;
EEPROMVar<int> threeFadeDuration = 60;
                            
EEPROMVar<int> fourStartMins = 1050;  // 6:pm
EEPROMVar<int> fourPhotoPeriod = 720;  
EEPROMVar<int> fourMax = 100;          
EEPROMVar<int> fourFadeDuration = 60; 

EEPROMVar<int> fiveStartMins = 1050;
EEPROMVar<int> fivePhotoPeriod = 720;  
EEPROMVar<int> fiveMax = 100;          
EEPROMVar<int> fiveFadeDuration = 60; 

EEPROMVar<int> sixStartMins = 1050;
EEPROMVar<int> sixPhotoPeriod = 720;  
EEPROMVar<int> sixMax = 100;          
EEPROMVar<int> sixFadeDuration = 60; 
// variables to invert the output PWM signal,
// for use with drivers that consider 0 to be "on"
// i.e. buckpucks. If you need to provide an inverted 
// signal on any channel, set the appropriate variable to true.
boolean oneInverted = false;
boolean twoInverted = false;
boolean threeInverted = false;
boolean fourInverted = false; 
boolean fiveInverted = false;
boolean sixInverted = false; 

int state = 0;       // state of keypress master state = 1 means read keypres
int h = 0;  // hours
int m = 0;  // minutes
int s = 0;  // seconds
//-----------print functions ------------------/
void PrintBegin()
{
  lcd.begin(LCD_R, LCD_C);   // start the library  
  lcd.setBacklight(ON);
   
}
void printTempMenu()
  {
  lcd.setCursor(12,0);
  lcd.print(dhtFTemp);
  lcd.setCursor(15,0);
  lcd.print((char)223);
  //lcd.setCursor(13,0);
  //lcd.print(dhtHumidity);
  //lcd.setCursor(15,0);
  //lcd.print("%");
  }
  void printTempHumidityMenu()
  {
  lcd.setCursor(9,0);
  lcd.print(dhtFTemp);
  lcd.setCursor(12,0);
  lcd.print((char)223);
  lcd.setCursor(13,0);
  lcd.print(dhtHumidity);
  lcd.setCursor(15,0);
  lcd.print("%");
  }
//  setup serial printer for use
void SPrintBegin()
  {
  Serial.begin(9600);
  Serial.println("Ready"); 
  }

// clean lcd screen
void cleanScreen()
{
  lcd.setCursor(0,0);
  lcd.print("                "); 
  lcd.setCursor(0,1);
  lcd.print("                ");
}
// readButtons from lcd shield
void ReadButtons()
   {
    uint8_t buttons = lcd.readButtons();

  if (buttons) {
    //lcd.clear();
    //lcd.setCursor(0,0);
    if (buttons & BUTTON_UP) {
     
    }
    if (buttons & BUTTON_DOWN) {
    
    }
    if (buttons & BUTTON_LEFT) {
     
    }
    if (buttons & BUTTON_RIGHT) {
     
    }
    if (buttons & BUTTON_SELECT) {
      
    }
  }
}
// end ReadButtons
/****** RTC Functions ******/
/***************************/

// Convert decimal numbers to binary coded decimal
byte decToBcd(byte val)
{
  return ( (val/10*16) + (val%10) );
}

// Convert binary coded decimal to decimal numbers
byte bcdToDec(byte val)
{
  return ( (val/16*10) + (val%16) );
}
// Sets date and time, starts the clock
void setDate(byte second,        // 0-59
             byte minute,        // 0-59
             byte hour,          // 1-23
             byte dayOfWeek,     // 1-7
             byte dayOfMonth,    // 1-31
             byte month,         // 1-12
             byte year)          // 0-99
{
   Wire.beginTransmission(DS1307_I2C_ADDRESS);
   Wire.write(0);
   Wire.write(decToBcd(second));
   Wire.write(decToBcd(minute));
   Wire.write(decToBcd(hour));
   Wire.write(decToBcd(dayOfWeek));
   Wire.write(decToBcd(dayOfMonth));
   Wire.write(decToBcd(month));
   Wire.write(decToBcd(year));
   Wire.endTransmission();
}

// Gets the date and time
void getDate(byte *second,
             byte *minute,
             byte *hour,
             byte *dayOfWeek,
             byte *dayOfMonth,
             byte *month,
             byte *year)
{
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.write(0);
  Wire.endTransmission();
  Wire.requestFrom(DS1307_I2C_ADDRESS, 7);
  *second     = bcdToDec(Wire.read() & 0x7f);
  *minute     = bcdToDec(Wire.read());
  *hour       = bcdToDec(Wire.read() & 0x3f);
  *dayOfWeek  = bcdToDec(Wire.read());
  *dayOfMonth = bcdToDec(Wire.read());
  *month      = bcdToDec(Wire.read());
  *year       = bcdToDec(Wire.read());
}
/****** LED Functions ******/
/***************************/
//function to set LED brightness according to time of day
//function has three equal phases - ramp up, hold, and ramp down

int   setLed(int mins,         // current time in minutes
            int ledPin,        // pin for this channel of LEDs
            int start,         // start time for this channel of LEDs
            int period,        // photoperiod for this channel of LEDs
            int fade,          // fade duration for this channel of LEDs
            int ledMax,        // max value for this channel
            boolean inverted   // true if the channel is inverted
            )  {
  int val = 0;
      
      //fade up
      if (mins > start || mins <= start + fade)  {
        val = map(mins - start, 0, fade, 0, ledMax);
      }
      //fade down
      if (mins > start + period - fade && mins <= start + period)  {
        val = map(mins - (start + period - fade), 0, fade, ledMax, 0);
      }
      //off or post-midnight run.
      if (mins <= start || mins > start + period)  {
        if((start+period)%1440 < start && (start + period)%1440 > mins )
          {
            val=map((start+period-mins)%1440,0,fade,0,ledMax);
          }
        else  
        val = 0; 
      }
    
    
    if (val > ledMax)  {val = ledMax;} 
    if (val < 0) {val = 0; } 
    
  if (inverted) {analogWrite(ledPin, map(val, 0, 100, 255, 0));}
  else {analogWrite(ledPin, map(val, 0, 100, 0, 255));}
  if(override){val=overpercent;}
  return val;
}
/**** Display Functions ****/
/***************************/

//button hold function
int btnCurrDelay(byte curr)
{
  if(curr==btnMaxIteration)
  {
    btnCurrIteration = btnMaxIteration;
    return btnMaxDelay;
  }
  else if(btnCurrIteration ==0)
  {
    return btnMinDelay;
  }
  else
  {
    btnCurrIteration--;
    return btnMaxDelay;
  }
}

// format a number of minutes into a readable time (24 hr format)
void printMins(int mins,       //time in minutes to print
               boolean ampm    //print am/pm?
              )  {
  int hr = (mins%1440)/60;
  int mn = mins%60;
    if(hr<10){
      lcd.print(" ");
    }
    lcd.print(hr);
    lcd.print(":");
    if(mn<10){
      lcd.print("0");
    }
    lcd.print(mn); 
}

// format hours, mins, secs into a readable time (24 hr format)
void printHMS (byte hr,
               byte mn,
               byte sec      //time to print
              )  
{
  
    if(hr<10){
      lcd.print(" ");
    }
    lcd.print(hr, DEC);
    lcd.print(":");
    if(mn<10){
      lcd.print("0");
    }
    lcd.print(mn, DEC);
    //lcd.print(":");
    //if(sec<10){
      //lcd.print("0");
    //}
    //lcd.print(sec, DEC);
}
void ovrSetAll(int pct){
    analogWrite(oneLed,map(pct,0,100,0,255));
    analogWrite(twoLed,map(pct,0,100,0,255));
    analogWrite(threeLed,map(pct,0,100,0,255));
    analogWrite(fourLed,map(pct,0,100,0,255));
    analogWrite(fiveLed,map(pct,0,100,0,255));
    analogWrite(sixLed,map(pct,0,100,0,255));
}
// setup ddrc and portc for temp/humidity sensor
// DHT11_GetData Use with Mega 2560 simple and direct
/*
void GetDHT11Data()
{
int chk = DHT.read(DHT11_PIN);    // READ DATA
  DHT11Temp = (int) round(DHT.temperature);
  dhtHumidity = DHT.humidity;
  dhtFTemp =  (int)round((1.8*DHT11Temp)+32);
}
// use for Uno compile does not work with Mega 2560
*/
void DHTSetup(){
   DDRC |= _BV(DHT11_PIN);
  PORTC |= _BV(DHT11_PIN);
  }
// read dht11 data line for input get current temperature and humidity
byte read_dht11_dat()
{
  
  byte i = 0;
  byte result=0;
  for(i=0; i< 8; i++)
  {
    while(!(PINC & _BV(DHT11_PIN)));  // wait for 50us
    delayMicroseconds(30);
    if(PINC & _BV(DHT11_PIN)) 
      result |=(1<<(7-i));
    while((PINC & _BV(DHT11_PIN)));  // wait '1' finish
    }
    return result;
}

// read data for input from dht11 temp/humidity sensor 
// use for Uno compile does not work with mega 2560

void GetDHTData()
  {
  byte dht11_dat[5];
  byte dht11_in;
  byte i;// start condition
   // 1. pull-down i/o pin from 18ms
  PORTC &= ~_BV(DHT11_PIN);
  delay(18);
  PORTC |= _BV(DHT11_PIN);
  delayMicroseconds(40);
  DDRC &= ~_BV(DHT11_PIN);
  delayMicroseconds(40);
  
  dht11_in = PINC & _BV(DHT11_PIN);
  if(dht11_in)
  {
   // Serial.println("dht11 start condition 1 not met");
    
    return;
  }
  delayMicroseconds(80);
  dht11_in = PINC & _BV(DHT11_PIN);
  if(!dht11_in)
  {
    //Serial.println("dht11 start condition 2 not met");
   
    return;
  }
  
  delayMicroseconds(80);// now ready for data reception
  for (i=0; i<5; i++)
    dht11_dat[i] = read_dht11_dat();
  DDRC |= _BV(DHT11_PIN);
  PORTC |= _BV(DHT11_PIN);
  byte dht11_check_sum = dht11_dat[0]+dht11_dat[1]+dht11_dat[2]+dht11_dat[3];// check check_sum
  if(dht11_dat[4]!= dht11_check_sum)
  
  {
    //Serial.println("DHT11 checksum error");
    
  }
  dhtCTemp=(int) round(dht11_dat[2]);
  //double dhtDTemp= double dht11_dat[2];
  dhtFTemp=(int)round(1.8*dht11_dat[2]+32);
  dhtHumidity=(int) dht11_dat[0];
  //double dhtDHumidity= double dht11_dat[0];
  } // end read data DHT11
//temperture menu
// showChannelValues()  print channel values to lcd
void showChannelValues() { // display the current intensity for each led channel
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
char buffer[17];
lcd.noCursor();
lcd.noBlink();
getDate(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
lcd.noCursor();
lcd.noBlink();
lcd.setCursor(0,0);
sprintf(buffer, "%3d %3d %3d", oneVal, twoVal, threeVal);
lcd.print(buffer);
lcd.setCursor(0,1);
sprintf(buffer, "%3d %3d %3d%2d:%02d", fourVal, fiveVal, sixVal, hour, minute);
lcd.print(buffer);
}
// end showChannelValues

// void setup
void setup()
{
Wire.begin();
//DHTSetup();

// setup lcd screen object
PrintBegin();
// set serial printer
SPrintBegin();
//splash screen
lcd.print("GrowGreen CoB");
lcd.setCursor(0,1);
lcd.print("LED Controller");
delay(5000);
lcd.clear();
//lcd.setBacklight(OFF);
//analogWrite(bkl,bklIdle);
btnCurrIteration = btnMaxIteration;


} // end setup

// Main loop
void loop(){ 
  
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;

  getDate(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
  oldMinCounter = minCounter;
  minCounter = hour * 60 + minute;
  
  //check & set fade durations
  if(oneFadeDuration > onePhotoPeriod/2 && onePhotoPeriod >0){oneFadeDuration = onePhotoPeriod/2;}
  if(oneFadeDuration<1){oneFadeDuration=1;}
  
  if(twoFadeDuration > twoPhotoPeriod/2 && twoPhotoPeriod >0){twoFadeDuration = twoPhotoPeriod/2;} 
  if(twoFadeDuration<1){twoFadeDuration=1;}
  
  if(threeFadeDuration > threePhotoPeriod/2 && threePhotoPeriod >0){threeFadeDuration = threePhotoPeriod/2;}
  if(threeFadeDuration<1){threeFadeDuration=1;}
  
  if(fourFadeDuration > fourPhotoPeriod/2 && fourPhotoPeriod > 0){fourFadeDuration = fourPhotoPeriod/2;}
  if(fourFadeDuration<1){fourFadeDuration=1;}
 
 if(fiveFadeDuration > fivePhotoPeriod/2 && fivePhotoPeriod >0){fiveFadeDuration = fivePhotoPeriod/2;}
  if(fiveFadeDuration<1){fiveFadeDuration=1;}
  
  if(sixFadeDuration > sixPhotoPeriod/2 && sixPhotoPeriod > 0){sixFadeDuration = sixPhotoPeriod/2;}
  if(sixFadeDuration<1){sixFadeDuration=1;} 
  
  //check & set any time functions
  
  
  //set outputs
  if(!override){
  oneVal = setLed(minCounter, oneLed, oneStartMins, onePhotoPeriod, oneFadeDuration, oneMax, oneInverted);
  twoVal = setLed(minCounter, twoLed, twoStartMins, twoPhotoPeriod, twoFadeDuration, twoMax, twoInverted);
  threeVal = setLed(minCounter, threeLed, threeStartMins, threePhotoPeriod, threeFadeDuration, threeMax, threeInverted);
  fourVal = setLed(minCounter, fourLed, fourStartMins, fourPhotoPeriod, fourFadeDuration, fourMax, fourInverted);
  fiveVal = setLed(minCounter, fiveLed, fiveStartMins, fivePhotoPeriod, fiveFadeDuration, fiveMax, fiveInverted);
  sixVal = setLed(minCounter, sixLed, sixStartMins, sixPhotoPeriod, sixFadeDuration, sixMax, sixInverted);
  
  }
  else{
    ovrSetAll(overpercent);
  }
  
  
  //turn the backlight off and reset the menu if the idle time has elapsed
  if(bklTime + bklDelay < millis() && bklTime > 0 ){
    
    menuCount = 1;
    lcd.clear();
    bklTime = 0;
  }

  //iterate through the menus
  uint8_t buttons = lcd.readButtons();
  if(buttons & BUTTON_SELECT){
    lcd.setBacklight(ON);
    bklTime = millis();
    if(menuCount < 28){
      menuCount++;
    }else {
      menuCount = 1;
    }
  lcd.clear();
  } // end if
//main screen turn on!!! 
  
  if(menuCount == 1){
    if (minCounter > oldMinCounter){
      lcd.clear();
    }
    showChannelValues();
    //debugging function to use the select button to advance the timer by 1 minute
    //if(select.uniquePress()){setDate(second, minute+1, hour, dayOfWeek, dayOfMonth, month, year);}
  }
  
  //Manual Override Menu
  if(menuCount == 2){
   
    lcd.setCursor(0,0);
    lcd.print("Manual Overrides");
    lcd.setCursor(0,1);
    lcd.print("All: ");
   
    if(buttons & BUTTON_RIGHT){
     
      if(menuSelect < 3 ){
        menuSelect++;
        
      }
      else{menuSelect = 0;}
      bklTime = millis();
    }
    
    if(menuSelect == 0){
      lcd.print("Timer");
      override = false;}
    if(menuSelect == 1  ){
      lcd.print("ON   ");
      overpercent = 100;
      override = true;}
    if(menuSelect == 2){
      lcd.print("OFF  ");
      overpercent = 0;
      override = true;}    
    if(menuSelect == 3  ){
      override = true;
      lcd.print(overpercent,DEC);
      lcd.print("%  ");
      if((buttons & BUTTON_RIGHT) && overpercent <100)
        {
          overpercent++;
          delay(btnCurrDelay(btnCurrIteration-1));
          bklTime = millis();
        }
        
        if((buttons & BUTTON_LEFT) && overpercent > 0)
        {
          overpercent--;
          delay(btnCurrDelay(btnCurrIteration-1));
          bklTime = millis();
        }
      }
  } // menucount = 2
  

//set start time for channel one
  if(menuCount == 3){
    lcd.setCursor(0,0);
    lcd.print("Channel 1 Start");
    lcd.setCursor(0,1);
    printMins(oneStartMins, true);
    
    if((buttons & BUTTON_RIGHT) && oneStartMins < 1440){
        oneStartMins++;
        if(onePhotoPeriod >0){onePhotoPeriod--;}
        else{onePhotoPeriod=1439;} // 24 hours
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && oneStartMins > 0){
        oneStartMins--;
        if(onePhotoPeriod<1439){onePhotoPeriod++;} // LT 24 hours
        else{onePhotoPeriod=0;}
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set end time for channel one
  if(menuCount == 4){
    lcd.setCursor(0,0);
    lcd.print("Channel 1 End");
    lcd.setCursor(0,1);
    printMins(oneStartMins+onePhotoPeriod, true); // add start and duration to calcuate end time
    if(buttons & BUTTON_RIGHT){
      if(onePhotoPeriod < 1439){ // 24 hours max
      onePhotoPeriod++;}
      else{
        onePhotoPeriod=0;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if(buttons & BUTTON_LEFT){
      if(onePhotoPeriod >0){
        onePhotoPeriod--;}
      else{
        onePhotoPeriod=1439; // 24 hours
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set fade duration for channel one
  if(menuCount == 5){
    lcd.setCursor(0,0);
    lcd.print("Channel 1 Fade");
    lcd.setCursor(0,1);
    printMins(oneFadeDuration, false);
    if((buttons & BUTTON_RIGHT) && (oneFadeDuration < onePhotoPeriod/2 || oneFadeDuration == 0)){
      oneFadeDuration++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && oneFadeDuration > 1){
      oneFadeDuration--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set intensity for channel one
  if(menuCount == 6){
    lcd.setCursor(0,0);
    lcd.print("Channel 1 Max");
    lcd.setCursor(1,1);
    lcd.print(oneMax);
    lcd.print("  ");
    if((buttons & BUTTON_RIGHT) && oneMax < 100){
      oneMax++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && oneMax > 0){
      oneMax--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set start time for channel two
  if(menuCount == 7){
    lcd.setCursor(0,0);
    lcd.print("Channel 2 Start");
    lcd.setCursor(0,1);
    printMins(twoStartMins, true);
    if((buttons & BUTTON_RIGHT) && twoStartMins < 1440){
        twoStartMins++;
        if(twoPhotoPeriod >0){twoPhotoPeriod--;}
        else{twoPhotoPeriod=1439;}
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && twoStartMins > 0){
        twoStartMins--;
        if(twoPhotoPeriod<1439){twoPhotoPeriod++;}
        else{twoPhotoPeriod=0;}
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
 //set end time for channel two
  if(menuCount == 8){
   lcd.setCursor(0,0);
    lcd.print("Channel 2 End");
    lcd.setCursor(0,1);
    printMins(twoStartMins+twoPhotoPeriod, true);
    if(buttons & BUTTON_RIGHT){
      if(twoPhotoPeriod < 1439){
      twoPhotoPeriod++;}
      else{
        twoPhotoPeriod=0;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if(buttons & BUTTON_LEFT){
      if(twoPhotoPeriod >0){
        twoPhotoPeriod--;}
      else{
        twoPhotoPeriod=1439;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set fade duration for channel two
  if(menuCount == 9){
    lcd.setCursor(0,0);
    lcd.print("Channel 2 Fade");
    lcd.setCursor(0,1);
    printMins(twoFadeDuration, false);
    if((buttons & BUTTON_RIGHT) && (twoFadeDuration < twoPhotoPeriod/2 || twoFadeDuration == 0)){
      twoFadeDuration++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && twoFadeDuration > 1){
      twoFadeDuration--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set intensity for channel two
  if(menuCount == 10){
    lcd.setCursor(0,0);
    lcd.print("Channel 2 Max");
    lcd.setCursor(1,1);
    lcd.print(twoMax);
    lcd.print("  ");
    if((buttons & BUTTON_RIGHT) && twoMax < 100){
      twoMax++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && twoMax > 0){
      twoMax--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set start time for channel three
  if(menuCount == 11){
    lcd.setCursor(0,0);
    lcd.print("Channel 3 Start");
    lcd.setCursor(0,1);
    printMins(threeStartMins, true);
    if((buttons & BUTTON_RIGHT) && threeStartMins < 1440){
        threeStartMins++;
        if(threePhotoPeriod >0){threePhotoPeriod--;}
        else{threePhotoPeriod=1439;}
        delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && threeStartMins > 0){
        threeStartMins--;
        if(threePhotoPeriod<1439){threePhotoPeriod++;}
        else{threePhotoPeriod=0;}
        delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set end time for channel three
  if(menuCount == 12){
    lcd.setCursor(0,0);
    lcd.print("Channel 3 End");
    lcd.setCursor(0,1);
    printMins(threeStartMins+threePhotoPeriod, true);
    if(buttons & BUTTON_RIGHT){
      if(threePhotoPeriod < 1439){
      threePhotoPeriod++;}
      else{
        threePhotoPeriod=0;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if(buttons & BUTTON_LEFT){
      if(threePhotoPeriod >0){
        threePhotoPeriod--;}
      else{
        threePhotoPeriod=1439;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set fade duration for channel three
  if(menuCount == 13){
    lcd.setCursor(0,0);
    lcd.print("Channel 3 Fade");
    lcd.setCursor(0,1);
    printMins(threeFadeDuration, false);
    if((buttons & BUTTON_RIGHT) && (threeFadeDuration < threePhotoPeriod/2 || threeFadeDuration == 0)){
      threeFadeDuration++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && threeFadeDuration > 1){
      threeFadeDuration--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set intensity for channel three
  if(menuCount == 14){
    lcd.setCursor(0,0);
    lcd.print("Channel 3 Max");
    lcd.setCursor(1,1);
    lcd.print(threeMax);
    lcd.print("  ");
    if((buttons & BUTTON_RIGHT) && threeMax < 100){
      threeMax++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && threeMax > 0){
      threeMax--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set start time for channel four
  if(menuCount == 15){
    lcd.setCursor(0,0);
    lcd.print("Channel 4 Start");
    lcd.setCursor(0,1);
    printMins(fourStartMins, true);
    if((buttons & BUTTON_RIGHT) && fourStartMins < 1440){
        fourStartMins++;
        if(fourPhotoPeriod >0){fourPhotoPeriod--;}
        else{fourPhotoPeriod=1439;}
        delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && fourStartMins > 0){
        fourStartMins--;
        if(fourPhotoPeriod<1439){fourPhotoPeriod++;}
        else{fourPhotoPeriod=0;}
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
 //set end time for channel four
  if(menuCount == 16){
    lcd.setCursor(0,0);
    lcd.print("Channel 4 End");
    lcd.setCursor(0,1);
    printMins(fourStartMins+fourPhotoPeriod, true);
    if(buttons & BUTTON_RIGHT){
      if(fourPhotoPeriod < 1439){
      fourPhotoPeriod++;}
      else{
        fourPhotoPeriod=0;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if(buttons & BUTTON_LEFT){
      if(fourPhotoPeriod >0){
        fourPhotoPeriod--;}
      else{
        fourPhotoPeriod=1439;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set fade duration for channel four
  if(menuCount == 17){
    lcd.setCursor(0,0);
    lcd.print("Channel 4 Fade");
    lcd.setCursor(0,1);
    printMins(fourFadeDuration, false);
    if((buttons & BUTTON_RIGHT) && (fourFadeDuration < fourPhotoPeriod/2 || fourFadeDuration == 0)){
      fourFadeDuration++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && fourFadeDuration > 1){
      fourFadeDuration--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set intensity for channel four
  if(menuCount == 18){
    lcd.setCursor(0,0);
    lcd.print("Channel 4 Max");
    lcd.setCursor(1,1);
    lcd.print(fourMax);
    lcd.print("   ");
    if((buttons & BUTTON_RIGHT) && fourMax < 100){
      fourMax++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && fourMax > 0){
      fourMax--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set start time for channel five
  if(menuCount == 19){
    lcd.setCursor(0,0);
    lcd.print("Channel 5 Start");
    lcd.setCursor(0,1);
    printMins(fiveStartMins, true);
    if((buttons & BUTTON_RIGHT) && fiveStartMins < 1440){
        fiveStartMins++;
        if(fivePhotoPeriod >0){fivePhotoPeriod--;}
        else{fivePhotoPeriod=1439;}
        delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && fiveStartMins > 0){
        fourStartMins--;
        if(fivePhotoPeriod<1439){fivePhotoPeriod++;}
        else{fivePhotoPeriod=0;}
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
 //set end time for channel five
  if(menuCount == 20){
    lcd.setCursor(0,0);
    lcd.print("Channel 5 End");
    lcd.setCursor(0,1);
    printMins(fiveStartMins+fivePhotoPeriod, true);
    if(buttons & BUTTON_RIGHT){
      if(fivePhotoPeriod < 1439){
      fivePhotoPeriod++;}
      else{
        fivePhotoPeriod=0;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if(buttons & BUTTON_LEFT){
      if(fivePhotoPeriod >0){
        fivePhotoPeriod--;}
      else{
        fivePhotoPeriod=1439;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set fade duration for channel five
  if(menuCount == 21){
    lcd.setCursor(0,0);
    lcd.print("Channel 5 Fade");
    lcd.setCursor(0,1);
    printMins(fiveFadeDuration, false);
    if((buttons & BUTTON_RIGHT) && (fiveFadeDuration < fivePhotoPeriod/2 || fiveFadeDuration == 0)){
      fiveFadeDuration++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && fiveFadeDuration > 1){
      fiveFadeDuration--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set intensity for channel five
  if(menuCount == 22){
    lcd.setCursor(0,0);
    lcd.print("Channel 5 Max");
    lcd.setCursor(1,1);
    lcd.print(fiveMax);
    lcd.print("   ");
    if((buttons & BUTTON_RIGHT) && fiveMax < 100){
      fiveMax++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && fiveMax > 0){
      fiveMax--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set start time for channel six
  if(menuCount == 23){
    lcd.setCursor(0,0);
    lcd.print("Channel 6 Start");
    lcd.setCursor(0,1);
    printMins(sixStartMins, true);
    if((buttons & BUTTON_RIGHT) && sixStartMins < 1440){
        sixStartMins++;
        if(sixPhotoPeriod >0){sixPhotoPeriod--;}
        else{sixPhotoPeriod=1439;}
        delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && fourStartMins > 0){
        sixStartMins--;
        if(sixPhotoPeriod<1439){sixPhotoPeriod++;}
        else{sixPhotoPeriod=0;}
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
 //set end time for channel six
  if(menuCount == 24){
    lcd.setCursor(0,0);
    lcd.print("Channel 6 End");
    lcd.setCursor(0,1);
    printMins(sixStartMins+sixPhotoPeriod, true);
    if(buttons & BUTTON_RIGHT){
      if(sixPhotoPeriod < 1439){
      sixPhotoPeriod++;}
      else{
        sixPhotoPeriod=0;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if(buttons & BUTTON_LEFT){
      if(sixPhotoPeriod >0){
        sixPhotoPeriod--;}
      else{
        sixPhotoPeriod=1439;
      }
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set fade duration for channel six
  if(menuCount == 25){
    lcd.setCursor(0,0);
    lcd.print("Channel 6 Fade");
    lcd.setCursor(0,1);
    printMins(fourFadeDuration, false);
    if((buttons & BUTTON_RIGHT) && (sixFadeDuration < sixPhotoPeriod/2 || sixFadeDuration == 0)){
      sixFadeDuration++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && sixFadeDuration > 1){
      sixFadeDuration--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }
//set intensity for channel six
  if(menuCount == 26){
    lcd.setCursor(0,0);
    lcd.print("Channel 6 Max");
    lcd.setCursor(1,1);
    lcd.print(sixMax);
    lcd.print("   ");
    if((buttons & BUTTON_RIGHT) && sixMax < 100){
      sixMax++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && sixMax > 0){
      sixMax--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  }    
//set hours
  if(menuCount == 27){
    lcd.setCursor(0,0);
    lcd.print("Set Time: Hrs");
    lcd.setCursor(0,1);
    printHMS(hour, minute, second);
    if((buttons & BUTTON_RIGHT) && hour < 23){
      hour++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && hour > 0){
      hour--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  setDate(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
  }
 //set minutes 
  if(menuCount == 28){
    lcd.setCursor(0,0);
    lcd.print("Set Time: Mins");
    lcd.setCursor(0,1);
    printHMS(hour, minute, second);
    if((buttons & BUTTON_RIGHT) && minute < 59){
      minute++;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
    if((buttons & BUTTON_LEFT) && minute > 0){
      minute--;
      delay(btnCurrDelay(btnCurrIteration-1));
      bklTime = millis();
    }
  setDate(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
  } // end menu count 28
}  // end loop
// end of sketch

Well after all that again... I just figured out the original script. I commented out the EEPROMVar section, uncommented the EEPROM section, changed Button(x,PULLDOWN) to Button(x), and then changed Wire.send to Wire.write, and Wire.receive to Wire.read. It now compiles without issues, and is so much easier for me to modify with my limited coding knowledge.