Greetings I am having a great deal of trouble getting the KS0108 GLCD I purchased on Sparkfun about a year ago to work.
Here is the pinout for an standard Arduino Duemilanove (168/328).
The program below Which I have cut and pasted does not compile with the complaints listed below.
I have the ks0108.h installed in the libraries folder Which library should I use? I noticed there were several. THe LCD I have does not have any pin labels as well.
Any ideas?
Thanks
#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
}
\libraries\ks0108\ks0108.cpp: In member function 'void ks0108::Init(boolean)':
\libraries\ks0108\ks0108.cpp:505: error: 'OUTPUT' was not declared in this scope
\libraries\ks0108\ks0108.cpp:505: error: 'pinMode' was not declared in this scope
\libraries\ks0108\ks0108.cpp:511: error: 'delay' was not declared in this scope
It does not appear to like this function "DrawBitmap as it is not highlighted in yellow as the rest are
GLCD.DrawBitmap(ArduinoIcon, 32,0, BLACK); //draw the bitmap at the given x,y position