GLCD_libraries_problem

I am new to GLCd. When i want to test whether my GLCD is working or not by copying the sample code , libraries it is showing GLCD is not declared in this scope ( for GLCD.Init). Can anyone help me

Show us which libraries and sample code you used. have you copy the libraries in to the correct directory?

the sample code in this link http://playground.arduino.cc/Code/GLCDks0108 and the libraries from http://www.arduino.cc/en/Main/Libraries my connections to the ks0108 pannel B from http://playground.arduino.cc/uploads/Code/GLCD_Documentation.pdf . I have copied the glcd library folder into the libraries folder of arduino and named it as 'GLCD'. I would be really thankful for your help in this.

Are you using this example code?

  #include <ks0108.h>  // library header
  #include <Arial14.h>  // font definition for 14 point Arial font.
  #include "SystemFont5x7.h"   // system font
  #include "ArduinoIcon.h"     // bitmap  
  unsigned long startMillis;
  unsigned int iter = 0;
void setup(){

  GLCD.Init(NON_INVERTED);   // initialise the library
  GLCD.ClearScreen();  
  GLCD.DrawBitmap(ArduinoIcon, 32,0, BLACK); //draw the bitmap at the given x,y position
  delay(3000);
  GLCD.ClearScreen();
  GLCD.SelectFont(System5x7);       // select fixed width system font 
}

void loop(){ // run over and over again

  startMillis = millis();
  while( millis() - startMillis < 1000){ // loop for one second
    GLCD.DrawRect(0, 0, 64, 61, BLACK); // rectangle in left side of screen
    GLCD.DrawRoundRect(68, 0, 58, 61, 5, BLACK);  // rounded rectangle around text area   
    for(int i=0; i < 62; i += 4)
      GLCD.DrawLine(1,1,63,i, BLACK);  // draw lines from upper left down right side of rectangle  
    GLCD.DrawCircle(32,31,30,BLACK);   // draw circle centered in the left side of screen  
    GLCD.FillRect(92,40,16,16, WHITE); // clear previous spinner position  
    GLCD.CursorTo(5,5);               // locate curser for printing text
    GLCD.PrintNumber(++iter);         // print current iteration at the current cursor position 
  } 
  // display number of iterations in one second
  GLCD.ClearScreen();               // clear the screen  
  GLCD.CursorTo(13,2);              // positon cursor  
  GLCD.Puts("FPS= ");               // print a text string  
  GLCD.PrintNumber(iter);           // print a number 
 }

This code was looking for library ks0108 which the version 2 of the GLCD library.

try to run the example code in the glcd name: ks0108 GLCDexample

@ BillHo thank you for your help, I can you help me out which library of glcd should i use and should i rename it when i copy it into the libraries subfolder of arduino because there is an error saying OUTPUT was not declared in this scope, pinMode was not declared in this scope, delay was not declared in this scope. can you help me out how to proceed further?

Library ks0108 which the version 2 of the GLCD library was not design to support for Arduino 1.x You should use version 3 of the GLCD library. try to run the example code in the glcd library name: ks0108 GLCDexample

If you still want to use the version 2 Library ks0108, the libraries folder will named it as 'ks0108' and add this to top line of the ks0108.h include file.

// Arduino versioning.
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

to clear the out of scope error.

Thank you, there is no error in the code but it is not displaying anything on the glcd my connections are according to http://playground.arduino.cc/uploads/Code/GLCD_Documentation.pdf pannel B

Troubleshooting

No pixels visible on the display

Check +5v and Gnd connections between Arduino and GLCD panel Check that all data and command pins are wired correctly Check contrast voltage (typically between -3 and -4 volts) on contrast-in pin of LCD panel. While the sketch is operating, try gradually adjusting the pot through its range. Some displays are very sensitive to this setting. Check sketch has compiled ok and downloaded to the arduino.

Contrast Pot NOTE: Play close attention for how to wire up the contrast pot. ks0108 modules do not wire up their contrast pot the same way as a typical hd44780 lcd. A hd44780 typically hooks its contrast pot legs to +5v and GND. On a ks0108, the pot, which is typically between 10-20k, is used to create a varying negative voltage from Vee up to GND that is used to feed to the Vo input signal. In order to do this, one leg of the pot needs to hook to ground, one leg needs to hook to the Vee negative voltage output pin and then the wiper (middle pin of the pot) will have the variable voltage output that can be fed to the Vo contrast control input pin.

Are you definitely using a KS108-compatible LCD?

i am using a jhd12864e glcd. I @ Bill ho i have taken care of those which you have mentioned but does not display anything.

glcd v3 Forum discussion