Skip to content

Instantly share code, notes, and snippets.

@hisachin
Created December 25, 2015 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hisachin/b56bcda2c0d7820ad771 to your computer and use it in GitHub Desktop.
Save hisachin/b56bcda2c0d7820ad771 to your computer and use it in GitHub Desktop.
custom_charactar code
// ProjectsDunia
// http://projectsdunia.blogspot.in
// http://fb.com/projectsdunia
// Display custom character in lcd
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int led=13;
// Store custom character
byte smile[8] =
{
0b00000,
0b00000,
0b01010,
0b00000,
0b10001,
0b01110,
0b00000,
0b00000
};
void setup()
{
pinMode(led,OUTPUT);
lcd.createChar(2, smile);
lcd.begin(16,2);
lcd.print(" ProjectsDunia");
lcd.setCursor(0,1);
lcd.write(2);
lcd.write(2);
lcd.write(2);
lcd.write(2);
lcd.write(2);
lcd.write(2);
}
void loop()
{
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment