Simple library for interfacing to Nokia 5110 LCD display (as found on the SparkFun website).

Dependents:   radarDistanceSensorTool

Fork of N5110 by Craig Evans

Files at this revision

API Documentation at this revision

Comitter:
el13k3s
Date:
Mon May 11 16:34:51 2015 +0000
Parent:
6:adb79338d40f
Commit message:
Initial commit - radar not working; ; 11 May 2015

Changed in this revision

N5110.cpp Show annotated file Show diff for this revision Revisions of this file
N5110.h Show annotated file Show diff for this revision Revisions of this file
diff -r adb79338d40f -r 505f281a04fa N5110.cpp
--- a/N5110.cpp	Mon Jan 27 18:41:45 2014 +0000
+++ b/N5110.cpp	Mon May 11 16:34:51 2015 +0000
@@ -60,8 +60,7 @@
 }
 
 // function to power up the LCD and backlight
-void N5110::turnOn()
-{
+void N5110::turnOn() {
     // set brightness of LED - 0.0 to 1.0 - default is 50%
     setBrightness(0.5);
     pwr->write(1);  // apply power
diff -r adb79338d40f -r 505f281a04fa N5110.h
--- a/N5110.h	Mon Jan 27 18:41:45 2014 +0000
+++ b/N5110.h	Mon May 11 16:34:51 2015 +0000
@@ -193,18 +193,19 @@
     *   TODO: Randomise the seed - maybe using the noise on the AnalogIn pins.
     */
     void randomiseBuffer();
+    void initSPI();
+    void clearRAM();
 
 private:
-    void initSPI();
-    void turnOn();
+    
     void reset();
-    void clearRAM();
     void clearBuffer();
     void sendCommand(unsigned char command);
     void sendData(unsigned char data);
 
 public:
     unsigned char buffer[84][6];  // screen buffer - the 6 is for the banks - each one is 8 bits;
+    void turnOn();
 
 private:  // private variables
     SPI*    spi;