Skip to content

Instantly share code, notes, and snippets.

@hisachin
Created December 25, 2015 13:53
Show Gist options
  • Select an option

  • Save hisachin/b56bcda2c0d7820ad771 to your computer and use it in GitHub Desktop.

Select an option

Save hisachin/b56bcda2c0d7820ad771 to your computer and use it in GitHub Desktop.

Revisions

  1. hisachin created this gist Dec 25, 2015.
    47 changes: 47 additions & 0 deletions custom_charactar
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    // 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);
    }