Create a gist now

Instantly share code, notes, and snippets.

A simple Arduino script to display the Sparkfun logo and SparkFun!! on a HD44780 LCD screen. See for a picture
The Sparkfun logo is intellectual property of Sparkfun Inc.
The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* 10K potentiometer:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)
* 10K poterntiometer on pin A0
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// make some custom characters:
byte sfe1[] = {0x01,0x03,0x03,0x01,0x04,0x08,0x1D,0x1F};
byte sfe2[] = {0x18,0x14,0x10,0x1A,0x1E,0x1F,0x1F,0x1F};
byte sfe3[] = {0x1F,0x1F,0x1F,0x1F,0x1F,0x1C,0x18,0x10};
byte sfe4[] = {0x1F,0x1E,0x1E,0x1C,0x10,0x00,0x00,0x00};
void setup() {
// create a new character
lcd.createChar(0, sfe1);
// create a new character
lcd.createChar(1, sfe2);
// create a new character
lcd.createChar(2, sfe3);
// create a new character
lcd.createChar(3, sfe4);
// set up the lcd's number of columns and rows:
lcd.begin(8, 2);
lcd.print(" Spark");
lcd.print(" Fun!!");
void loop() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment