Howdy. I'm new to Arduino and C++, and get the following error message:
In function 'void loop()':
error: request for member 'ezCls' in 'ezLCD', which is of non-class type 'EzLCD () ()'
The Arduino code (sketch) is:
#include <ezLCD.h>
void setup(){Serial.begin(9600);}
int r = 76;
EzLCD ezLCD();
void loop(){
if (r==76) {
delay (2000);
Serial.print("""); // Light on
// EzLCD ezSetXY(120, 80, 0, 0);
}
// EzLCD ezCircle (0, 0, 0, r--); // Draw Circle
if (r<3) {
r=76 ;
delay(5000);
ezLCD.ezCls(0, 0, 255, 0); // Clear screen to white
// EzLCD ezSetColor(0, 0, 56, 0); // Green
}
}
The header file is ezLCD.h (in ezLCD directory) :
// ezLCD.h Driver for ezLCD001.
// (c) 2010 Earth Computer Technologies, Inc. dba EarthLCD.com
// Put in ezLCD directory in arduino. Example: ...\arduino-0018\libraries\ezLCD\
#ifndef EzLCD_h
#define EzLCD_h
#include "WProgram.h"
class EzLCD
{
public:
EzLCD(int _x, int _y, int _color, int _radius);
void ezSetXY(int _x, int _y);
void ezCls(int _color);
void ezSetColor(int _color);
void ezCircle (int _radius);
};
#endif
The C++ file is ezLCD.cpp (in ezLCD directory) :
// ezLCD.cpp Driver for ezLCD001.
// (c) 2010 Earth Computer Technologies, Inc. dba EarthLCD.com
// Put in ezLCD directory in arduino. Example: ...\arduino-0018\libraries\ezLCD\
#include "WProgram.h"
#include "EzLCD.h"
EzLCD::EzLCD(int _x, int _y, int _color, int _radius){
}
/*
void EzLCD::ezSetXY(int _x, int _y) {
if (_x >= 0 && _x <= 240 && _y >= 0 && _y <= 160 ){
Serial.print("%"); // SetXY
Serial.print(_x, BYTE); // SetXY X
Serial.print(_y, BYTE); // SetXY Y
}
}
*/
void EzLCD::ezCls(int _color) {
// ezSetColor(_color);
Serial.print("$"); //setcolor
Serial.print("255");//white
Serial.print("!"); // cls
}
/*
void EzLCD::ezSetColor(int _color){
Serial.print("$"); //setcolor
Serial.print(_color, BYTE);
}
void EzLCD::ezCircle (int _radius){
Serial.print(")"); // Cricle_R
Serial.print(_radius, BYTE);
}
*/
Thanks for your help.