Hi, I am trying to get the LCD (color LCD shield Sparkfun) but is simply does not react - blue screen and that's it. I tried example code (and made it a bit simpler). I tried to play with the contrast. But nothing at all!
This is the code I use (there is a library which could be used).
It is maybe something very simple but I am not experienced at all, so I do not know where to look.
I have stacked the LCD on Arduino MEGA 2560.
Help is appreceiated!
//************************************************************************
// Nokia Shield
//************************************************************************
//* Derived from code by James P. Lynch and Mark Sproul.
//*
//Edit History
// = Mark Sproul, msproul -at- jove.rutgers.edu
//* = Peter Davenport, electrifiedpete -at- gmail.com
//************************************************************************
//* Apr 2, 2010 I received my Color LCD Shield sku: LCD-09363 from sparkfun.
//* Apr 2, 2010 The code was written for WinAVR, I modified it to compile under Arduino.
//* Aug 7, 2010 Organized code and removed unneccesary elements.
//* Aug 23, 2010 Added LCDSetLine, LCDSetRect, and LCDPutStr.
//* Oct 31, 2010 Added circle code from Carl Seutter and added contrast code.
//************************************************************************
// External Component Libs
#include "LCD_driver.h"
//#include "nokia_tester.h"
// Included files
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include "WProgram.h"
#include "HardwareSerial.h"
//************************************************************************
// Main Code
//************************************************************************
void setup()
{
ioinit(); //Initialize I/O
LCDInit(); //Initialize the LCD
LCDContrast(20);
LCDClear(GREEN); // Clear LCD to a solid color
LCDPutStr("Click a button!", 0, 4, ORANGE, WHITE); // Write instructions on display
LCDPutStr("This library", 32, 4, BLACK, WHITE);
LCDPutStr("is for world", 48, 4, BLACK, WHITE);
LCDPutStr("domination!", 64, 4, BLACK, WHITE);
LCDPutStr("and other", 80, 4, BLACK, WHITE);
LCDPutStr("fun stuff.", 96, 4, BLACK, WHITE);
}
int num = 1;
//************************************************************************
// Loop
//************************************************************************
void loop()
{
}