Pages: [1]   Go Down
Author Topic: Problems uploading examples to my 12864a glcd  (Read 727 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Got my 12864a glcd ks0108, working for some sketches but getting errors on most other sketches.

Have downloaded examples from here..http://glcd-arduino.googlecode.com/files/glcd-20110423.zip

And followed the directions for installation into my library folder.

I see the examples and cannot verify any of these examples.

Each one comes up with an error.

I can wire up my 2560 to work with an rfid reader so I know it is ok.

Here is the clock face example..

Quote
/*
* AnalogClock.h - Analog clock display for Graphics LCD libraries
*/
#ifndef AnalogClock_h
#define AnalogClock_h

#include <WProgram.h>

class AnalogClock
{
private:
/* Sizes and positions of clock */
byte x_centre      ; /* x-coordinate of clock centre                  */
byte y_centre      ; /* y-coordinate of clock centre                  */
byte radius        ; /* radius of clock face                          */
byte radius_aspect ; /* radius of clock face adjuted for aspect ratio */
byte l_hour        ; /* length of hour hand                           */
byte l_minute      ; /* length of minute hand                         */
byte l_second      ; /* length of second hand                         */

/* Previous positions of hour and minute hands */
byte PX_Hour   ; /* previous x-coordinate of hour hand   */
byte PY_Hour   ; /* previous y-coordinate of hour hand   */
byte PX_Minute ; /* previous x-coordinate of minute hand */
byte PY_Minute ; /* previous y-coordinate of minute hand */
byte PX_Second ; /* previous x-coordinate of second hand */
byte PY_Second ; /* previous y-coordinate of second hand */

/* Positions of digital clock and date, and time offset */
byte DigRow     ; /* row position of digital clock    */
byte DigColumn  ; /* column position of digital clock */
byte Offset     ; /* time offset from system clock    */
byte Hours      ; /* current hours                    */
byte Minutes    ; /* current minutes                  */
byte Seconds    ; /* current seconds                  */
byte DateRow    ; /* row position of date string      */
byte DateColumn ; /* column position of date string   */

  void CalcHands( byte angle, byte radius, byte *x, byte *y );
  void Box( byte x, byte y );
  void SegBox( byte FaceAngle );
public:      // Public Methods
  AnalogClock();
  void Init(byte x, byte y, byte r); //  x & y are the coordinates of the center of the clock, r is the radius of the clock face
  void DrawFace();
  void DisplayTime( byte hours, byte minutes, byte seconds = -1 ); // draw hands in the position for the given hours and minutes
};

#endif


The error i get is

Analog clock .cpp:35:error:byte was not declared in this scope.

With this line highlighted.....  byte x_centre      ; /* x-coordinate of clock centre

Any help appreciated.

Greg
« Last Edit: April 16, 2013, 08:58:57 am by gregted » Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2731
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greg,
I'm not sure where you got that link for the library but that library is out of date.
Have a look at the playground page: http://playground.arduino.cc/Code/GLCDks0108
There is more information there and links to the glcd library project page
and latest library download.

--- bill
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply Bill,

I have downloaded that library and deleted my old directory called glcd but still getting error messages on clock face.

Error message now states error on this line..

GLCD.DrawCircle(x,y, r + 3,BLACK); // draw the surrounding circle

Glcd was not declared in this scope.

This is the same error I got before on the other program. Is there a link to error messages and their meanings?
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2731
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply Bill,

I have downloaded that library and deleted my old directory called glcd but still getting error messages on clock face.

Error message now states error on this line..

GLCD.DrawCircle(x,y, r + 3,BLACK); // draw the surrounding circle

Glcd was not declared in this scope.

Exactness really matters.
Was it "Glcd or was it really "GLCD" ?
Are you compiling your own sketch or one of the provided example sketches?
How are you compiling the sketch?


This is the same error I got before on the other program. Is there a link to error messages and their meanings?

The error above as you typed it means that there is no object declared "Glcd".
If it really was "GLCD", my guess is that the library may not really installed properly.
What version of the IDE are you using?
What OS platform are you using?
If you click on [File]->[Examples]
do you see an entry for "glcd" in the list?
If not, then the library is not properly installed.
If you do see it, then the glcd library is installed properly and we
need to look deeper.
To look deeper at error/warning messages:
Click on [File]->[Preferences]
Then check the "show verbose output during [] compilation"
Then build the example sketch and report the output back here.
It is best to cut and paste the output so the output is exactly what
came out of the compiler.

--- bill
Logged

Pages: [1]   Go Up
Jump to: