Created
December 25, 2015 13:53
-
-
Save hisachin/b56bcda2c0d7820ad771 to your computer and use it in GitHub Desktop.
custom_charactar code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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