Arduino nokia 5110 lcd screen problem Hello I have a nokia 5110 lcd display connected to my Arduino. I have looked at so many tutorials and none of them work for me. I am trying to get a bitmap displayed in the screen but only the lights light up and nothing else happens.
I have the lcd connected to the following Arduino pins:


vcc -- 3.3v
gnd -- gnd
sce -- pin 7
rst -- pin 6
d/c -- pin 5
DN -- pin 4
sclk -- pin 8
led -- 100ohm resistor --pin 11


here is an image


Nothing will display on the screen could someone please help me here is my code:

 #include "U8glib.h"
 #include "dht.h"

 #define dht_apin A1
 #define backlight_pin 11

 dht DHT;

 U8GLIB_PCD8544 u8g(8, 4, 7, 5, 6);  // CLK=8, DIN=4, CE=7, DC=5, RST=6

 const uint8_t brainy_bitmap[] PROGMEM = {
  0x00, 0x00, 0x03, 0xB0, 0x00, 0x00, 0x00, 0x00, 
  0x07, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x46,
  0x00, 0x00, 0x00, 0x00, 0xFC, 0x47, 0xC0, 0x00, 
  0x00, 0x01, 0xCE, 0x4C, 0x60, 0x00, 0x00, 0x03,
  0x02, 0x58, 0x30, 0x00, 0x00, 0x03, 0x02, 0x58, 
  0x10, 0x00, 0x00, 0x02, 0x02, 0x58, 0x18, 0x00,
  0x00, 0x03, 0x06, 0x4C, 0x18, 0x00, 0x00, 0x07, 
  0x04, 0x44, 0x18, 0x00, 0x00, 0x0D, 0x80, 0x40,
  0x3C, 0x00, 0x00, 0x09, 0xC0, 0x40, 0xE6, 0x00,
  0x00, 0x18, 0x78, 0x47, 0xC2, 0x00, 0x00, 0x18,
  0x0C, 0x4E, 0x02, 0x00, 0x00, 0x1F, 0x86, 0x4C, 
  0x7E, 0x00, 0x00, 0x0E, 0xC6, 0xE8, 0xEE, 0x00,
  0x00, 0x18, 0x43, 0xF8, 0x82, 0x00, 0x00, 0x10, 
  0x06, 0x4C, 0x03, 0x00, 0x00, 0x30, 0x0C, 0x46,
  0x01, 0x00, 0x00, 0x30, 0x18, 0x46, 0x01, 0x00, 
  0x00, 0x10, 0x18, 0x43, 0x03, 0x00, 0x00, 0x18,
  0x10, 0x43, 0x03, 0x00, 0x00, 0x1C, 0x70, 0x41, 
  0x86, 0x00, 0x00, 0x0F, 0xE0, 0x40, 0xFE, 0x00,
  0x00, 0x09, 0x1E, 0x4F, 0x06, 0x00, 0x00, 0x08, 
  0x30, 0x43, 0x86, 0x00, 0x00, 0x0C, 0x20, 0x41,
  0x86, 0x00, 0x00, 0x06, 0x60, 0x40, 0x8C, 0x00, 
  0x00, 0x07, 0x60, 0x40, 0xB8, 0x00, 0x00, 0x01,
  0xE0, 0x41, 0xF0, 0x00, 0x00, 0x00, 0x38, 0xE3, 
  0x00, 0x00, 0x00, 0x00, 0x0F, 0xBE, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xCF, 
  0x82, 0x0C, 0x86, 0x46, 0x1F, 0xEF, 0xC3, 0x0C,
  0xC6, 0xEE, 0x1C, 0xEC, 0xC7, 0x0C, 0xE6, 0x7C, 
  0x1C, 0xED, 0x8D, 0x8C, 0xFE, 0x38, 0x1C, 0xED,
  0x8D, 0xCC, 0xDE, 0x38, 0x1D, 0xCD, 0xDF, 0xCC, 
  0xCE, 0x38, 0x1F, 0x8C, 0xF8, 0xEC, 0xC6, 0x38,
  0x1F, 0xEC, 0x08, 0x0C, 0xC2, 0x18, 0x1C, 0xEC, 
  0x00, 0xC0, 0x00, 0x00, 0x1C, 0xFD, 0xFB, 0xC0,
  0x00, 0x00, 0x1C, 0xFC, 0x63, 0x00, 0x00, 0x00, 
  0x1C, 0xEC, 0x63, 0xC0, 0x00, 0x00, 0x1F, 0xEC,
  0x60, 0xC0, 0x00, 0x00, 0x1F, 0xCC, 0x63, 0xC0, 
  0x00, 0x00, 0x1F, 0x0C, 0x63, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
  0x00, 0x00, 0x00, 0x00, 0x28, 0x2B, 0x4F, 0x67,
  0x42, 0x38, 0x7B, 0xEA, 0x86, 0xB2, 0x28, 0xC7, 
 };

 void draw(void) {
   u8g.drawBitmapP( 0, 0, 6, 50, brainy_bitmap);  // put bitmap
   u8g.drawStr(10, 10, "% ");

 void loop(void) {

   u8g.firstPage();  
   do {
     draw();
   } while( u8g.nextPage() );

     delay(5000);  // Delay of 5sec before accessing DHT11 (min - 2sec)
   }
There are several possibilities.

Arduino GPIO pins drive outputs to ground or 5V.  

The pins on the Nokia 5110 LCDs boards I have are not 5V tolerant. So you might have damaged them when the Arduino's GPIO connected to 5V.  

A simple fix is to put a 10k ohm resistor in each signal path, i.e.


sce -- pin 7
rst -- pin 6
d/c -- pin 5
DN -- pin 4
sclk -- pin 8


You could get a level-shift chip, or build a circuit, but resistors are quick, cheap and easy.

I would strongly recommend using a very simple Arduino library to get the display working. Then, once everything is working, continue with your current approach. All you need is a simple test; something which turns pixels on and off to check that it works.

I have had good results with the Arduino Playground Philips PCD8544 (Nokia 3310) driver

I have several Nokia 5110's. A few needed the values loaded at initialisation to be tweaked, to make the display visible.   

Specifically in void LcdInitialise(void):

  LcdWrite(LCD_C, 0x21 );  // LCD Extended Commands.
  LcdWrite(LCD_C, 0xB1 );  // Set LCD Vop (Contrast). 
  LcdWrite(LCD_C, 0x04 );  // Set Temp coefficent. //0x04
  LcdWrite(LCD_C, 0x14 );  // LCD bias mode 1:48. //0x13
  LcdWrite(LCD_C, 0x20 );  // LCD Basic Commands
  LcdWrite(LCD_C, 0x0C );  // LCD in normal mode.


I have had to tweak Set Temp coefficent, LCD bias mode 1:48 and Set LCD Vop (Contrast) to get make the display clear, without looking washed-out, or all-dark. Using a very simple library like the Philips PCD8544 (Nokia 3310) driver should make it easy to adjust this until things work well.