Error Compiling Custom Library

So, I've been working on arduino off and on for less than a year, and this is my first attempt to make a custom library, and I am struggling. I've gotten everything written out and it even seems like the code likes the library, except for one error message I keep getting when I try to run a program from the custom class I created. I'm trying to store my exercise routine in an arduino. Basically trying to combine my love of arduino with the motication to get active. Haha. The program without the class compiles just fine, so I know it's not the program, so let me just throw the library out files out there. Header first.

#ifndef Exercise_h
#define Exercise_h

#include <Arduino.h>


//Declare Variables
const long oneSecond = 1000;
const long oneMin = oneSecond * 60;
long startSetMillis = 0, startRepMillis = 0, startSecMillis = 0;
int sets = 0, reps = 0, mins = 0, secs = 0, restset = 5;
int numSet = 0, numRep = 0, numMin = -1, numSec = 0, setSec = 0, spd = 0;
boolean status_on = true;
boolean start_sets = true, start_reps = true, start_secs = true;
boolean exerprep = true;

//Define Exercise class
class exercise
{
 public: 
    int Type;         //Frequency or Duration Exercise
    char Specify;     //Specify exactly which exercise to perform
    int Sets;         //Sets to perform
    int Rest;         //Rest time between sets
    int Duration;     //How long to hold duration exercise 
    int Reps;         //Reps to perform during each set on a frequency exercise
    int Speed;        //Speed at which to complete each rep on a frequency exercise
	void initializeExer();
	void countReps();
	void countRepSets();
	void countSecs();
	void countTimeSets();
};


#endif

And the .cpp.

#include <Exercise.h>

void initializeExer() //Initializes all variables to default state
{
  sets = 0;
  reps = 0;
  secs = 0;
  numSet = 0;
  numRep = 0;
  numMin = -1;
  numSec = 0;
  restset = 5;
  status_on = true;
  start_sets = true; 
  start_reps = true; 
  start_secs = true;
  exerprep = true;
}

void countReps()
{
  if(start_reps)
  {
    startRepMillis = millis();
    start_reps = false;
  } 
  else {
    if(((millis()-startRepMillis) > spd*oneSecond) && (numRep >= 0) && status_on)
    {
      if(numRep > 0)
      {
        numRep--;
        start_reps = true;
        for (int i=0; i<150; i++)
        {
          digitalWrite(12, HIGH);
          delayMicroseconds(750);
          digitalWrite(12, LOW);
          delayMicroseconds(750);
        }
      } 
      else if(numRep == 0) {
        numRep = reps;
        numSet--;
        startSetMillis = millis();
        for (int i=0; i<200; i++)
        {
          digitalWrite(12, HIGH);
          delayMicroseconds(1000);
          digitalWrite(12, LOW);
          delayMicroseconds(1000);
        }
      }
    }
  }
}

void countRepSets(exercise repSets)
{
  if(exerprep == true)
  {
	numSet = repSets.Sets;
	numRep = repSets.Reps;
	exerprep = false;
  }
  if((numSet == sets) && status_on)
  {
    countReps();
  } 
  else if((numSet > 0) && (numSet < repSets.Sets) && status_on){
    if((millis()-startSetMillis) > (repSets.Rest*oneSecond)){
      countReps();
    }
  } 
  else if(numSet <= 0){
    delay(oneSecond);
    for(int a=0; a<5; a++)
    {
      for (int i=0; i<250; i++)
      {
        digitalWrite(12, HIGH);
        delayMicroseconds(500);
        digitalWrite(12, LOW);
        delayMicroseconds(500);
      }
      delay(100);
    }
  }
}   

void countSecs()
{
  if(start_secs){
    startSecMillis = millis();
    start_secs = false;
  } 
  else 
  {
    if(((millis() - startSecMillis) >= oneSecond) && (numSec >= 0) && status_on)
    {
      if((numSec / 60) != numMin)
      {
        numMin = numSec / 60;
      }
      if(numSec > 0){
        numSec = numSec - 1;
        start_secs = true;
      } 
      else if(numSec == 0)
      {
        numSec = setSec;
        numSet--;
        startSetMillis = millis();
        for (int i=0; i<250; i++)
        {
          digitalWrite(12, HIGH);
          delayMicroseconds(1000);
          digitalWrite(12, LOW);
          delayMicroseconds(1000);
        }
      }
    }
  }
}

void countTimeSets(exercise timedSets)
{
  if (exerprep == true)
  {
	  numSet = timedSets.Sets;
      numMin = -1;
      setSec = timedSets.Duration;
	  numSec = setSec;
	  exerprep = false;
  }
  if((numSet == timedSets.Sets) && status_on)
  {
    countSecs();
  } 
  else if((numSet > 0) && (numSet < timedSets.Sets) && status_on){
    if((millis() - startSetMillis) > (timedSets.Rest*oneSecond)){
      countSecs();
    }
  } 
  else if(numSet <= 0){
    delay(oneSecond);
    for(int a=0; a<5; a++)
    {
      for (int i=0; i<250; i++)
      {
        digitalWrite(12, HIGH);
        delayMicroseconds(500);
        digitalWrite(12, LOW);
        delayMicroseconds(500);
      }
      delay(100);
    }
  }
}

Any guidance you guys can offer is great! I'm not looking to have the answer handed to me, just looking for the right direction to travel in. I'll also link the error codes that I'm getting when I compile in the next post.

Exercise\Exercise.cpp.o:(.data.start_secs+0x0): multiple definition of `start_secs'
Pivot_Clock.cpp.o:(.data.start_secs+0x0): first defined here
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions
Exercise\Exercise.cpp.o: In function `countSecs()':
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:91: multiple definition of `startSecMillis'
Pivot_Clock.cpp.o:(.bss.startSecMillis+0x0): first defined here
Exercise\Exercise.cpp.o: In function `countSecs()':
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:91: multiple definition of `numSec'
Pivot_Clock.cpp.o:(.bss.numSec+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.status_on+0x0): multiple definition of `status_on'
Pivot_Clock.cpp.o:(.data.status_on+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.numMin+0x0): multiple definition of `numMin'
Pivot_Clock.cpp.o:(.data.numMin+0x0): first defined here
Exercise\Exercise.cpp.o: In function `countSecs()':
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:91: multiple definition of `setSec'
Pivot_Clock.cpp.o:(.bss.setSec+0x0): first defined here
Exercise\Exercise.cpp.o: In function `countSecs()':
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:91: multiple definition of `numSet'
Pivot_Clock.cpp.o:(.bss.numSet+0x0): first defined here
Exercise\Exercise.cpp.o: In function `countSecs()':
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:91: multiple definition of `startSetMillis'
Pivot_Clock.cpp.o:(.bss.startSetMillis+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.exerprep+0x0): multiple definition of `exerprep'
Pivot_Clock.cpp.o:(.data.exerprep+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.start_reps+0x0): multiple definition of `start_reps'
Pivot_Clock.cpp.o:(.data.start_reps+0x0): first defined here
Exercise\Exercise.cpp.o: In function `countSecs()':
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:91: multiple definition of `startRepMillis'
Pivot_Clock.cpp.o:(.bss.startRepMillis+0x0): first defined here
Exercise\Exercise.cpp.o: In function `countSecs()':
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:91: multiple definition of `spd'
Pivot_Clock.cpp.o:(.bss.spd+0x0): first defined here
Exercise\Exercise.cpp.o: In function `countSecs()':
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:91: multiple definition of `numRep'
Pivot_Clock.cpp.o:(.bss.numRep+0x0): first defined here
Exercise\Exercise.cpp.o: In function `countSecs()':
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:91: multiple definition of `reps'
Pivot_Clock.cpp.o:(.bss.reps+0x0): first defined here
Exercise\Exercise.cpp.o: In function `countSecs()':
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:91: multiple definition of `sets'
Pivot_Clock.cpp.o:(.bss.sets+0x0): first defined here
Exercise\Exercise.cpp.o: In function `countSecs()':
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:91: multiple definition of `mins'
Pivot_Clock.cpp.o:(.bss.mins+0x0): first defined here
Exercise\Exercise.cpp.o: In function `countSecs()':
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:91: multiple definition of `secs'
Pivot_Clock.cpp.o:(.bss.secs+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.restset+0x0): multiple definition of `restset'
Pivot_Clock.cpp.o:(.data.restset+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.start_sets+0x0): multiple definition of `start_sets'
Pivot_Clock.cpp.o:(.data.start_sets+0x0): first defined here
Pivot_Clock.cpp.o: In function `loop':
Pivot_Clock.cpp:(.text.loop+0x16dc): undefined reference to `exercise::countRepSets()'
Pivot_Clock.cpp:(.text.loop+0x16f8): undefined reference to `exercise::countTimeSets()'
Pivot_Clock.cpp:(.text.loop+0x1c32): undefined reference to `exercise::countRepSets()'
Pivot_Clock.cpp:(.text.loop+0x1c5c): undefined reference to `exercise::countTimeSets()'

There's the errors. Thanks so much guys. Always love the community!

class exercise

appears to be defined in

#include <Exercise.h>

Wrong! Case matters!

void initializeExer() //I

This is a function, not a method. Constructors do NOT have types.

The class is "exercise", but the file is "Exercise.h". I should have attached the file names as well.

I did not realize that about constructors! Thank you so much! As I take the type away from the constructors, I now get this error.

C:\Users\Michael\Documents\Arduino\libraries\Exercise\Exercise.cpp:3: error: ISO C++ forbids declaration of 'initializeExer' with no type
C:\Users\Michael\Documents\Arduino\libraries\Exercise\Exercise.cpp:20: error: ISO C++ forbids declaration of 'countReps' with no type
C:\Users\Michael\Documents\Arduino\libraries\Exercise\Exercise.cpp:58: error: ISO C++ forbids declaration of 'countRepSets' with no type
C:\Users\Michael\Documents\Arduino\libraries\Exercise\Exercise.cpp:91: error: ISO C++ forbids declaration of 'countSecs' with no type
C:\Users\Michael\Documents\Arduino\libraries\Exercise\Exercise.cpp:126: error: ISO C++ forbids declaration of 'countTimeSets' with no type

This leads me to believe that it does need a type. <_< I am confused.

Okay, I did some research into constructors and destructors, and I think I found the issue, but now I have a new issue, which I hope is simple to resolve.

#ifndef Exercise_h
#define Exercise_h

#include <Arduino.h>


//Declare Variables
const long oneSecond = 1000;
const long oneMin = oneSecond * 60;
long startSetMillis = 0, startRepMillis = 0, startSecMillis = 0;
int sets = 0, reps = 0, mins = 0, secs = 0, restset = 5;
int numSet = 0, numRep = 0, numMin = -1, numSec = 0, setSec = 0, spd = 0;
boolean status_on = true;
boolean start_sets = true, start_reps = true, start_secs = true;
boolean exerprep = true;

//Define Exercise class
class exercise
{
 public: 
    char Type;         //Frequency or Duration Exercise
    char Specify;     //Specify exactly which exercise to perform
    int Sets;         //Sets to perform
    int Rest;         //Rest time between sets
    int Duration;     //How long to hold duration exercise 
    int Reps;         //Reps to perform during each set on a frequency exercise
    int Speed;        //Speed at which to complete each rep on a frequency exercise
	void initializeExer();
	void countReps();
	void countRepSets(exercise repSets);
	void countSecs();
	void countTimeSets(exercise timedSets);
};


#endif
#include <Exercise.h>

void exercise::initializeExer() //Initializes all variables to default state
{
  sets = 0;
  reps = 0;
  secs = 0;
  numSet = 0;
  numRep = 0;
  numMin = -1;
  numSec = 0;
  restset = 5;
  status_on = true;
  start_sets = true; 
  start_reps = true; 
  start_secs = true;
  exerprep = true;
}

void exercise::countReps()
{
  if(start_reps)
  {
    startRepMillis = millis();
    start_reps = false;
  } 
  else {
    if(((millis()-startRepMillis) > spd*oneSecond) && (numRep >= 0) && status_on)
    {
      if(numRep > 0)
      {
        numRep--;
        start_reps = true;
        for (int i=0; i<150; i++)
        {
          digitalWrite(12, HIGH);
          delayMicroseconds(750);
          digitalWrite(12, LOW);
          delayMicroseconds(750);
        }
      } 
      else if(numRep == 0) {
        numRep = reps;
        numSet--;
        startSetMillis = millis();
        for (int i=0; i<200; i++)
        {
          digitalWrite(12, HIGH);
          delayMicroseconds(1000);
          digitalWrite(12, LOW);
          delayMicroseconds(1000);
        }
      }
    }
  }
}

void exercise::countRepSets(exercise repSets)
{
  if(exerprep == true)
  {
	numSet = repSets.Sets;
	numRep = repSets.Reps;
	exerprep = false;
  }
  if((numSet == sets) && status_on)
  {
    countReps();
  } 
  else if((numSet > 0) && (numSet < repSets.Sets) && status_on){
    if((millis()-startSetMillis) > (repSets.Rest*oneSecond)){
      countReps();
    }
  } 
  else if(numSet <= 0){
    delay(oneSecond);
    for(int a=0; a<5; a++)
    {
      for (int i=0; i<250; i++)
      {
        digitalWrite(12, HIGH);
        delayMicroseconds(500);
        digitalWrite(12, LOW);
        delayMicroseconds(500);
      }
      delay(100);
    }
  }
}   

void exercise::countSecs()
{
  if(start_secs){
    startSecMillis = millis();
    start_secs = false;
  } 
  else 
  {
    if(((millis() - startSecMillis) >= oneSecond) && (numSec >= 0) && status_on)
    {
      if((numSec / 60) != numMin)
      {
        numMin = numSec / 60;
      }
      if(numSec > 0){
        numSec = numSec - 1;
        start_secs = true;
      } 
      else if(numSec == 0)
      {
        numSec = setSec;
        numSet--;
        startSetMillis = millis();
        for (int i=0; i<250; i++)
        {
          digitalWrite(12, HIGH);
          delayMicroseconds(1000);
          digitalWrite(12, LOW);
          delayMicroseconds(1000);
        }
      }
    }
  }
}

void exercise::countTimeSets(exercise timedSets)
{
  if (exerprep == true)
  {
	  numSet = timedSets.Sets;
      numMin = -1;
      setSec = timedSets.Duration;
	  numSec = setSec;
	  exerprep = false;
  }
  if((numSet == timedSets.Sets) && status_on)
  {
    countSecs();
  } 
  else if((numSet > 0) && (numSet < timedSets.Sets) && status_on){
    if((millis() - startSetMillis) > (timedSets.Rest*oneSecond)){
      countSecs();
    }
  } 
  else if(numSet <= 0){
    delay(oneSecond);
    for(int a=0; a<5; a++)
    {
      for (int i=0; i<250; i++)
      {
        digitalWrite(12, HIGH);
        delayMicroseconds(500);
        digitalWrite(12, LOW);
        delayMicroseconds(500);
      }
      delay(100);
    }
  }
}
Pivot_Clock.ino: In function 'void loop()':
Pivot_Clock:1021: error: no matching function for call to 'exercise::countRepSets()'
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.h:34: note: candidates are: void exercise::countRepSets(exercise)
Pivot_Clock:1028: error: no matching function for call to 'exercise::countTimeSets()'
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.h:36: note: candidates are: void exercise::countTimeSets(exercise)
Pivot_Clock:1166: error: no matching function for call to 'exercise::countRepSets()'
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.h:34: note: candidates are: void exercise::countRepSets(exercise)
Pivot_Clock:1191: error: no matching function for call to 'exercise::countTimeSets()'
C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.h:36: note: candidates are: void exercise::countTimeSets(exercise)

I'm still learning, so I'm not really 100% sure what I'm doing with exercise:: added before the functions, which seems to help, because without the type descriptors, I was getting the error I described in the post before. Hmmm...I'm making progress though. Thanks for the tips. I definitely welcome any more!

Nevermind. I'm an idiot. I had code where I had forgotten to add input when I called the functions. New errors now! Woohoo progress!

Wait, now the error messages I'm getting are the same as the ones I was getting originally. Doh! <_<

Exercise\Exercise.cpp.o:C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:5: multiple definition of `sets'
Pivot_Clock.cpp.o:(.bss.sets+0x0): first defined here
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions
Exercise\Exercise.cpp.o:C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:5: multiple definition of `reps'
Pivot_Clock.cpp.o:(.bss.reps+0x0): first defined here
Exercise\Exercise.cpp.o:C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:5: multiple definition of `secs'
Pivot_Clock.cpp.o:(.bss.secs+0x0): first defined here
Exercise\Exercise.cpp.o:C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:5: multiple definition of `numSet'
Pivot_Clock.cpp.o:(.bss.numSet+0x0): first defined here
Exercise\Exercise.cpp.o:C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:5: multiple definition of `numRep'
Pivot_Clock.cpp.o:(.bss.numRep+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.numMin+0x0): multiple definition of `numMin'
Pivot_Clock.cpp.o:(.data.numMin+0x0): first defined here
Exercise\Exercise.cpp.o:C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:5: multiple definition of `numSec'
Pivot_Clock.cpp.o:(.bss.numSec+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.restset+0x0): multiple definition of `restset'
Pivot_Clock.cpp.o:(.data.restset+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.status_on+0x0): multiple definition of `status_on'
Pivot_Clock.cpp.o:(.data.status_on+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.start_sets+0x0): multiple definition of `start_sets'
Pivot_Clock.cpp.o:(.data.start_sets+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.start_reps+0x0): multiple definition of `start_reps'
Pivot_Clock.cpp.o:(.data.start_reps+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.start_secs+0x0): multiple definition of `start_secs'
Pivot_Clock.cpp.o:(.data.start_secs+0x0): first defined here
Exercise\Exercise.cpp.o:(.data.exerprep+0x0): multiple definition of `exerprep'
Pivot_Clock.cpp.o:(.data.exerprep+0x0): first defined here
Exercise\Exercise.cpp.o:C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:5: multiple definition of `startSecMillis'
Pivot_Clock.cpp.o:(.bss.startSecMillis+0x0): first defined here
Exercise\Exercise.cpp.o:C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:5: multiple definition of `setSec'
Pivot_Clock.cpp.o:(.bss.setSec+0x0): first defined here
Exercise\Exercise.cpp.o:C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:5: multiple definition of `startSetMillis'
Pivot_Clock.cpp.o:(.bss.startSetMillis+0x0): first defined here
Exercise\Exercise.cpp.o:C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:5: multiple definition of `startRepMillis'
Pivot_Clock.cpp.o:(.bss.startRepMillis+0x0): first defined here
Exercise\Exercise.cpp.o:C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:5: multiple definition of `spd'
Pivot_Clock.cpp.o:(.bss.spd+0x0): first defined here
Exercise\Exercise.cpp.o:C:\Users\Michael\Documents\Arduino\libraries\Exercise/Exercise.cpp:5: multiple definition of `mins'
Pivot_Clock.cpp.o:(.bss.mins+0x0): first defined here

The problem you are having with multiple definitions of variables is because the compiler sees your .h file twice. Once when it's included from your main sketch, and then again when it's included from your .cpp file.

The way around this is to define the variables within your .cpp file. To make them available to your main sketch you can refer to them in the .h file as extern This makes the compiler aware of their existence but implies that they will be defined elsewhere in your code.

Another issue:
Your member functions in the .CPP file should be defined something like
void exercise::functionName()

I've made the necessary alterations to your .h and .cpp files and they compile, however you'll notice I've remarked some of the function definitions out. This is because there is some confustion wether they should be member functions of the class or have the class instance passed to them. They need a bit of a rewrite that I'm not inclined to do right now.

Exercise.h

#ifndef Exercise_h
#define Exercise_h

#include <Arduino.h>


//Declare Variables
extern const long oneSecond;
extern const long oneMin;
extern long startSetMillis;
extern long startRepMillis;
extern long startSecMillis;
extern int sets;
extern int reps;
extern int mins;
extern int secs;
extern int restset;
extern int numSet;
extern int numRep;
extern int numMin;
extern int numSec;
extern int setSec;
extern int spd;
extern boolean status_on; 
extern boolean start_sets;
extern boolean start_reps;
extern boolean  start_secs;
extern boolean exerprep;

//Define Exercise class
class exercise
{
 public: 
    int Type;         //Frequency or Duration Exercise
    char Specify;     //Specify exactly which exercise to perform
    int Sets;         //Sets to perform
    int Rest;         //Rest time between sets
    int Duration;     //How long to hold duration exercise 
    int Reps;         //Reps to perform during each set on a frequency exercise
    int Speed;        //Speed at which to complete each rep on a frequency exercise
    void initializeExer();
	void countReps();
	void countRepSets();
	void countSecs();
	void countTimeSets();
};

#endif

Exercise.cpp

#include "Exercise.h"

//Declare Variables
const long oneSecond = 1000;
const long oneMin = oneSecond * 60;
long startSetMillis = 0, startRepMillis = 0, startSecMillis = 0;
int sets = 0, reps = 0, mins = 0, secs = 0, restset = 5;
int numSet = 0, numRep = 0, numMin = -1, numSec = 0, setSec = 0, spd = 0;
boolean status_on = true;
boolean start_sets = true, start_reps = true, start_secs = true;
boolean exerprep = true;


void exercise::initializeExer() //Initializes all variables to default state
{
  sets = 0;
  reps = 0;
  secs = 0;
  numSet = 0;
  numRep = 0;
  numMin = -1;
  numSec = 0;
  restset = 5;
  status_on = true;
  start_sets = true; 
  start_reps = true; 
  start_secs = true;
  exerprep = true;
}

void exercise::countReps()
{
  if(start_reps)
  {
    startRepMillis = millis();
    start_reps = false;
  } 
  else {
    if(((millis()-startRepMillis) > spd*oneSecond) && (numRep >= 0) && status_on)
    {
      if(numRep > 0)
      {
        numRep--;
        start_reps = true;
        for (int i=0; i<150; i++)
        {
          digitalWrite(12, HIGH);
          delayMicroseconds(750);
          digitalWrite(12, LOW);
          delayMicroseconds(750);
        }
      } 
      else if(numRep == 0) {
        numRep = reps;
        numSet--;
        startSetMillis = millis();
        for (int i=0; i<200; i++)
        {
          digitalWrite(12, HIGH);
          delayMicroseconds(1000);
          digitalWrite(12, LOW);
          delayMicroseconds(1000);
        }
      }
    }
  }
}
/*
void exercise::countRepSets()
{
  if(exerprep == true)
  {
	numSet = repSets.Sets;
	numRep = repSets.Reps;
	exerprep = false;
  }
  if((numSet == sets) && status_on)
  {
    countReps();
  } 
  else if((numSet > 0) && (numSet < repSets.Sets) && status_on){
    if((millis()-startSetMillis) > (repSets.Rest*oneSecond)){
      countReps();
    }
  } 
  else if(numSet <= 0){
    delay(oneSecond);
    for(int a=0; a<5; a++)
    {
      for (int i=0; i<250; i++)
      {
        digitalWrite(12, HIGH);
        delayMicroseconds(500);
        digitalWrite(12, LOW);
        delayMicroseconds(500);
      }
      delay(100);
    }
  }
}   
*/
void exercise::countSecs()
{
  if(start_secs){
    startSecMillis = millis();
    start_secs = false;
  } 
  else 
  {
    if(((millis() - startSecMillis) >= oneSecond) && (numSec >= 0) && status_on)
    {
      if((numSec / 60) != numMin)
      {
        numMin = numSec / 60;
      }
      if(numSec > 0){
        numSec = numSec - 1;
        start_secs = true;
      } 
      else if(numSec == 0)
      {
        numSec = setSec;
        numSet--;
        startSetMillis = millis();
        for (int i=0; i<250; i++)
        {
          digitalWrite(12, HIGH);
          delayMicroseconds(1000);
          digitalWrite(12, LOW);
          delayMicroseconds(1000);
        }
      }
    }
  }
}
/*
void exercise::countTimeSets(exercise timedSets)
{
  if (exerprep == true)
  {
	  numSet = timedSets.Sets;
      numMin = -1;
      setSec = timedSets.Duration;
	  numSec = setSec;
	  exerprep = false;
  }
  if((numSet == timedSets.Sets) && status_on)
  {
    countSecs();
  } 
  else if((numSet > 0) && (numSet < timedSets.Sets) && status_on){
    if((millis() - startSetMillis) > (timedSets.Rest*oneSecond)){
      countSecs();
    }
  } 
  else if(numSet <= 0){
    delay(oneSecond);
    for(int a=0; a<5; a++)
    {
      for (int i=0; i<250; i++)
      {
        digitalWrite(12, HIGH);
        delayMicroseconds(500);
        digitalWrite(12, LOW);
        delayMicroseconds(500);
      }
      delay(100);
    }
  }
}
*/

I did not consider that. Thank you so much Ken! I also rewrote them just before your post to fix the exercise::function() problem, which I still need to research since I don't understand what that actually does. The countRepSets and countTimeSets functions are supposed to be passed exercise class variables so that the program can process them, allowing me to keep track of pacing during exercises. Some exercises have reps, like a dumbell curl, but exercises such as flexibility exercises require you to hold them for a certain amount of time.

I did not know about the extern declaration, so thank you so much for that. Thanks for the guidance!

It compiles now! Thank you thank you thank you! Made the changes to incorporate the input of exercises into the two functions and now it seems to work great! You guys never cease to impress me!

Hassurunous:
I did not consider that. Thank you so much Ken! I also rewrote them just before your post to fix the exercise::function() problem, which I still need to research since I don't understand what that actually does. The countRepSets and countTimeSets functions are supposed to be passed exercise class variables so that the program can process them, allowing me to keep track of pacing during exercises. Some exercises have reps, like a dumbell curl, but exercises such as flexibility exercises require you to hold them for a certain amount of time.

I did not know about the extern declaration, so thank you so much for that. Thanks for the guidance!

I think maybe this will get you on the right track:

[b]Demo.h[/b]
#ifndef _DEMO_H
#define _DEMO_H

#if ARDUINO < 100
#include <WProgram.h>
#else
#include <Arduino.h>
#endif

class Demo
{
public:
    void init (void);
private:
    uint8_t initialized;
};

#endif
[b]Demo.cpp[/b]
#include "Demo.h"

void Demo::init (void)
{
    initialized = 0;
}
[b]Demo.ino[/b]
#include <Demo.h>

static Demo D;

void setup (void)
{
    D.init ();
}

void loop (void)
{
}

The class is "exercise", but the file is "Exercise.h". I should have attached the file names as well.

That is WRONG!

The file name should match the class name. If the class is exercise, the file should be exercise.h. If the file is Exercise.h, the class name should be Exercise.