Learning about libraries, but getting error.

Hello! I’m learning the basics of Arduino environment libraries and need a little help. I’m trying to write a basic library that can blink a light, but I’m getting the error

blinkLibraryPractice.ino: In function ‘void loop()’:
blinkLibraryPractice.ino:12:8: error: expected unqualified-id before ‘.’ token
blinkLibraryPractice.ino:14:8: error: expected unqualified-id before ‘.’ token

I’m guessing there’s something here that I’m not seeing or doing properly. Here is my program code:

#include <MillTimer.h>


int led13=13;

void setup(){
 pinMode(led13,OUTPUT); 
}

void loop(){
  digitalWrite(led13,HIGH);
  Timer.secStop();
  digitalWrite(led13,LOW);
  Timer.secStop();
}

Here is the header file:

#ifndef Timer_h
#define Timer_h
#include "Arduino.h"

class Timer
{
 public:
  void secStop();
};




#endif

Here is the cpp file:

#include "Arduino.h"
#include "MillTimer.h"

void Timer::secStop()
{
  delay(1000);
}

here is the keyword file:

Timer	KEYWORD1
secStop	KEYWORD2

what is causing the error and more importantly I want to understand the error. Thanks everybody!

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

You never declare an instance of Timer.

Exactly. Timer is a class not an instance. For example you feed Fido, you don’t feed dog. Dog is just a class of animals. This compiles:

Timer t;   // <------- an instance of Timer

int led13=13;

void setup(){
 pinMode(led13,OUTPUT); 
}

void loop(){
  digitalWrite(led13,HIGH);
  t.secStop();
  digitalWrite(led13,LOW);
  t.secStop();
}

Ok I need to declare an instance of Timer. Is declaring an instance something like declaring a variable? I’ve learning a lot of this coding methodology on the fly and I’m not used to some of the verbage.

In Nick’s example, Time t; is listed. Is Time equivalent in general terms as a declaration to int, bool, or long and the t equivalent to the name of the variable?

[declarationOperator] [variableName]
int variableA;
bool yesOrNo;
Time t(or any other variable I should choose);

Then later in the code, I invoke the library operator as t.secStop();

Is that a correct way to think about library declarations? Am I even making sense? Today’s been a bit long and I’m a bit slow on the the draw

You seem to have the basic idea. An instance of a class is a variable, same as int or long. You could regards the class as a "type".

As an example, you don't write this:

int = int + 1;

The word "int" is a type of variable, not a variable, right? So you write:

int a = 0;  // the variable is "a", the type is "int"

a = a + 1;