I purchased the Nokia 5110 lcd display a while ago and I have an issue:
I’m using the Arduino Uno for this and I can get a scroll text program to work fine, but not graphics. I’m aiming to only make (say) Game of Life stuff, involving simple pixel points of the form:
void drawPixel(uint16_t x, uint16_t y, uint16_t color);
My issue is using the 'Adafruit_PCD8544' library with the screen – I’ve downloaded the library and can include the *h and *cpp files fine, but I get the error:
sketch_aug12a:12: error: 'Adafruit_PCD8544' does not name a type
During the line
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);
I think I’m doing something fundamentally wrong but can’t see what.
Sincerely and I look forward to hearing from you,
Jake
[Edit - moderator - Please use the 'code' button when submitting code]
P.s. Stripped down version:
- Code: Select all
#include <Adafruit_GFX.h>
#include <Adafruit_PCD854444.h>
#include <Adafruit_PCD854444.cpp>
// pin 7 - Serial clock out (SCLK)
// pin 6 - Serial data out (DIN)
// pin 5 - Data/Command select (D/C)
// pin 4 - LCD chip select (CS)
// pin 3 - LCD reset (RST)
//Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);
// also tried this but get the same result:
//Adafruit_PCD8544 display(7, 6, 5, 4, 3);
void setup()
{
Serial.begin(9600);
//display.begin(); // initiate done
//display.setContrast(50); // change contrast for suitable viewing
//display.display(); // show splashscreen
//delay(2000);
//display.clearDisplay(); // clears the screen and buffer
}
void loop()
{
}

