Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
mohammadsohail0008
Published © GPL3+

Do you want to Play with my Digital Dog ?πŸ•β€πŸ¦Ί

An LCD Dog FriendπŸ•β€πŸ¦Ί

AdvancedFull instructions provided166
Do you want to Play with my Digital Dog ?πŸ•β€πŸ¦Ί

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Alphanumeric LCD, 16 x 2
Alphanumeric LCD, 16 x 2
×1
Single Turn Potentiometer- 10k ohms
Single Turn Potentiometer- 10k ohms
×1
Breadboard (generic)
Breadboard (generic)
×1
Pushbutton Switch, Push-Pull
Pushbutton Switch, Push-Pull
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Resistor 330 ohm
Resistor 330 ohm
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit Diagram

Code

Arduino code

Arduino
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 10, 11, 12, 13); // RS, E, D4, D5, D6, D7
void setup() {
lcd.begin(16, 2);
image();
}
void loop() {}

void image() {
lcd.clear();

byte image09[8] = {B00000, B00000, B00000, B00010, B00101, B10101, B01101, B00001};
byte image08[8] = {B01000, B10100, B00100, B10010, B00001, B01000, B10000, B00000};
byte image07[8] = {B00100, B01011, B01000, B01010, B10001, B10101, B10011, B10000};
byte image23[8] = {B10000, B10000, B10000, B10000, B01001, B01010, B00100, B00000};
byte image24[8] = {B00000, B00000, B00000, B01110, B01010, B01010, B10001, B00000};
byte image25[8] = {B00001, B00001, B00001, B00010, B11010, B11010, B00100, B00000};


lcd.createChar(0, image09);
lcd.createChar(1, image08);
lcd.createChar(2, image07);
lcd.createChar(3, image23);
lcd.createChar(4, image24);
lcd.createChar(5, image25);


lcd.setCursor(8, 0);
lcd.write(byte(0));
lcd.setCursor(7, 0);
lcd.write(byte(1));
lcd.setCursor(6, 0);
lcd.write(byte(2));
lcd.setCursor(6, 1);
lcd.write(byte(3));
lcd.setCursor(7, 1);
lcd.write(byte(4));
lcd.setCursor(8, 1);
lcd.write(byte(5));

delay(1000);

lcd.clear();

byte image06[8] = {B00000, B00000, B00000, B00010, B00101, B10101, B01101, B00001};
byte image22[8] = {B00001, B00001, B00001, B11010, B11010, B01010, B00100, B00000};
byte image21[8] = {B00000, B00000, B00000, B01110, B01010, B01010, B10001, B00000};
byte image05[8] = {B01000, B10100, B00100, B10010, B00001, B01000, B10000, B00000};
byte image04[8] = {B00100, B01011, B01000, B01010, B10001, B10101, B10011, B10000};
byte image20[8] = {B10000, B10000, B10000, B10000, B01001, B01010, B00100, B00000};


lcd.createChar(0, image06);
lcd.createChar(1, image22);
lcd.createChar(2, image21);
lcd.createChar(3, image05);
lcd.createChar(4, image04);
lcd.createChar(5, image20);


lcd.setCursor(5, 0);
lcd.write(byte(0));
lcd.setCursor(5, 1);
lcd.write(byte(1));
lcd.setCursor(4, 1);
lcd.write(byte(2));
lcd.setCursor(4, 0);
lcd.write(byte(3));
lcd.setCursor(3, 0);
lcd.write(byte(4));
lcd.setCursor(3, 1);
lcd.write(byte(5));
delay(1000);

lcd.clear();

byte image03[8] = {B00000, B00000, B00000, B00010, B00101, B10101, B01101, B00001};
byte image19[8] = {B00001, B00001, B00001, B11010, B11010, B01010, B00100, B00000};
byte image02[8] = {B01000, B10100, B00100, B10010, B00001, B01000, B10000, B00000};
byte image01[8] = {B00100, B01011, B01000, B01010, B10001, B10101, B10011, B10000};
byte image18[8] = {B00000, B00000, B00000, B01110, B01010, B01010, B10001, B00000};
byte image17[8] = {B10000, B10000, B10000, B10000, B01001, B01010, B00100, B00000};


lcd.createChar(0, image03);
lcd.createChar(1, image19);
lcd.createChar(2, image02);
lcd.createChar(3, image01);
lcd.createChar(4, image18);
lcd.createChar(5, image17);


lcd.setCursor(2, 0);
lcd.write(byte(0));
lcd.setCursor(2, 1);
lcd.write(byte(1));
lcd.setCursor(1, 0);
lcd.write(byte(2));
lcd.setCursor(0, 0);
lcd.write(byte(3));
lcd.setCursor(1, 1);
lcd.write(byte(4));
lcd.setCursor(0, 1);
lcd.write(byte(5));
delay(1000);

lcd.clear();

byte image32[8] = {B00001, B00001, B00001, B11010, B11010, B01010, B00100, B00000};
byte image16[8] = {B00000, B00000, B00000, B00010, B00101, B10101, B01101, B00001};
byte image15[8] = {B01000, B10100, B00100, B10010, B00001, B01000, B10000, B00000};
byte image14[8] = {B00100, B01011, B01000, B01010, B10001, B10101, B10011, B10000};
byte image30[8] = {B10000, B10000, B10000, B10000, B01001, B01010, B00100, B00000};
byte image31[8] = {B00000, B00000, B00000, B01110, B01010, B01010, B10001, B00000};


lcd.createChar(0, image32);
lcd.createChar(1, image16);
lcd.createChar(2, image15);
lcd.createChar(3, image14);
lcd.createChar(4, image30);
lcd.createChar(5, image31);


lcd.setCursor(15, 1);
lcd.write(byte(0));
lcd.setCursor(15, 0);
lcd.write(byte(1));
lcd.setCursor(14, 0);
lcd.write(byte(2));
lcd.setCursor(13, 0);
lcd.write(byte(3));
lcd.setCursor(13, 1);
lcd.write(byte(4));
lcd.setCursor(14, 1);
lcd.write(byte(5));
delay(1000);

lcd.clear();

byte image29[8] = {B00001, B00001, B00001, B11010, B11010, B01010, B00100, B00000};
byte image28[8] = {B00000, B00000, B00000, B01110, B01010, B01010, B10001, B00000};
byte image27[8] = {B10000, B10000, B10000, B10000, B01001, B01010, B00100, B00000};
byte image13[8] = {B00000, B00000, B00000, B00010, B00101, B10101, B01101, B00001};
byte image12[8] = {B01000, B10100, B00100, B10010, B00001, B01000, B10000, B00000};
byte image11[8] = {B00100, B01011, B01000, B01010, B10001, B10101, B10011, B10000};


lcd.createChar(0, image29);
lcd.createChar(1, image28);
lcd.createChar(2, image27);
lcd.createChar(3, image13);
lcd.createChar(4, image12);
lcd.createChar(5, image11);


lcd.setCursor(12, 1);
lcd.write(byte(0));
lcd.setCursor(11, 1);
lcd.write(byte(1));
lcd.setCursor(10, 1);
lcd.write(byte(2));
lcd.setCursor(12, 0);
lcd.write(byte(3));
lcd.setCursor(11, 0);
lcd.write(byte(4));
lcd.setCursor(10, 0);
lcd.write(byte(5));
delay(1000);

lcd.clear();

byte image40[8] = {B00100, B01011, B01000, B01010, B10001, B10101, B10011, B10000};
byte image10[8] = {B01000, B10100, B00100, B10010, B00001, B01000, B10000, B00000};
byte image41[8] = {B00000, B00000, B00000, B00010, B00101, B10101, B01101, B00001};
byte image35[8] = {B10000, B10000, B10000, B10000, B01001, B01010, B00100, B00000};
byte image26[8] = {B00000, B00000, B00000, B01110, B01010, B01010, B10001, B00000};
byte image44[8] = {B00001, B00001, B00001, B11010, B11010, B01010, B00100, B00000};


lcd.createChar(0, image40);
lcd.createChar(1, image10);
lcd.createChar(2, image41);
lcd.createChar(3, image35);
lcd.createChar(4, image26);
lcd.createChar(5, image44);


lcd.setCursor(8, 0);
lcd.write(byte(0));
lcd.setCursor(9, 0);
lcd.write(byte(1));
lcd.setCursor(10, 0);
lcd.write(byte(2));
lcd.setCursor(8, 1);
lcd.write(byte(3));
lcd.setCursor(9, 1);
lcd.write(byte(4));
lcd.setCursor(10, 1);
lcd.write(byte(5));
//Here is where the original code used to end. HERE!
delay(1000);
lcd.begin(16, 2);
lcd.print("Hello!");
byte image50[8] = {B00001, B00001, B00001, B11010, B11010, B01010, B00100, B00000};
byte image52[8] = {B00000, B00000, B00000, B01110, B01010, B01010, B10001, B00000};
byte image57[8] = {B10000, B10000, B10000, B10000, B01001, B01010, B00100, B00000};
byte image53[8] = {B00000, B00000, B00000, B00010, B00101, B10101, B01101, B00001};
byte image58[8] = {B01000, B10100, B00100, B10010, B00001, B01000, B10000, B00000};
byte image51[8] = {B00100, B01011, B01000, B01010, B10001, B10101, B10011, B10000};


lcd.createChar(0, image50);
lcd.createChar(1, image52);
lcd.createChar(2, image57);
lcd.createChar(3, image53);
lcd.createChar(4, image58);
lcd.createChar(5, image51);


lcd.setCursor(12, 1);
lcd.write(byte(0));
lcd.setCursor(11, 1);
lcd.write(byte(1));
lcd.setCursor(10, 1);
lcd.write(byte(2));
lcd.setCursor(12, 0);
lcd.write(byte(3));
lcd.setCursor(11, 0);
lcd.write(byte(4));
lcd.setCursor(10, 0);
lcd.write(byte(5));
delay(5000);
lcd.begin(16, 2);
lcd.print("What's on");
delay(2000);
lcd.begin(16, 2);
lcd.print("your mind today?");
delay(2000);

lcd.clear();
lcd.begin(16, 2);
lcd.print("Woof,Woof!");
byte image67[8] = {B01100, B10000, B10000, B10010, B10010, B10010, B01010, B00110};
byte image61[8] = {B00000, B00000, B00000, B00000, B00000, B00000, B00000, B00011};
byte image62[8] = {B00000, B00000, B00000, B00000, B00000, B00000, B11000, B00100};
byte image68[8] = {B00001, B01001, B01000, B00000, B00000, B00001, B00110, B00100};
byte image69[8] = {B00000, B11000, B11000, B11000, B01000, B10000, B00000, B00000};


lcd.createChar(0, image67);
lcd.createChar(1, image61);
lcd.createChar(2, image62);
lcd.createChar(3, image68);
lcd.createChar(4, image69);


lcd.setCursor(10, 1);
lcd.write(byte(0));
lcd.setCursor(10, 0);
lcd.write(byte(1));
lcd.setCursor(11, 0);
lcd.write(byte(2));
lcd.setCursor(11, 1);
lcd.write(byte(3));
lcd.setCursor(12, 1);
lcd.write(byte(4));
delay(3000);
lcd.begin(16, 2);
lcd.print("Uh oh!");
byte image77[8] = {B01100, B10000, B10000, B10010, B10010, B10010, B01010, B00110};
byte image71[8] = {B00000, B00000, B00000, B00000, B00000, B00000, B00000, B00011};
byte image72[8] = {B00000, B00000, B00000, B00000, B00000, B00000, B11000, B00100};
byte image78[8] = {B00001, B01001, B01000, B00000, B00000, B00001, B00110, B00100};
byte image79[8] = {B00000, B11000, B11000, B11000, B01000, B10000, B00000, B00000};


lcd.createChar(0, image77);
lcd.createChar(1, image71);
lcd.createChar(2, image72);
lcd.createChar(3, image78);
lcd.createChar(4, image79);


lcd.setCursor(10, 1);
lcd.write(byte(0));
lcd.setCursor(10, 0);
lcd.write(byte(1));
lcd.setCursor(11, 0);
lcd.write(byte(2));
lcd.setCursor(11, 1);
lcd.write(byte(3));
lcd.setCursor(12, 1);
lcd.write(byte(4));
delay(2000);
lcd.begin(16, 2);
lcd.print("I think I need");
delay(1500);
lcd.begin(16, 2);
lcd.print("To go to the");
delay(1500);
lcd.begin(16, 2);
lcd.print("BATHROOM!");
delay(2000);
lcd.begin(16, 2);
lcd.print("Give me one");
delay(1500);
lcd.begin(16, 2);
lcd.print("Second please.");
delay(4000);
lcd.begin(16, 2);
lcd.print("OHH...");

byte image80[8] = {B00001, B00010, B00111, B00100, B01001, B01110, B10000, B01111};
byte image81[8] = {B10000, B11000, B00100, B01100, B10010, B00110, B11001, B11110};
byte image85[8] = {B00000, B00000, B00000, B00000, B00000, B01000, B10000, B10000};


lcd.createChar(0, image80);
lcd.createChar(1, image81);
lcd.createChar(2, image85);


lcd.setCursor(13, 1);
lcd.write(byte(0));
lcd.setCursor(14, 1);
lcd.write(byte(1));
lcd.setCursor(14, 0);
lcd.write(byte(2));
delay(2000);
lcd.begin(16, 2);
lcd.print("Looks like I");
delay(1500);
lcd.begin(16, 2);
lcd.print("I left a little");
delay(1500);
lcd.begin(16, 2);
lcd.print("Stinky suprise!");
delay(2000);
lcd.begin(16, 2);
lcd.print("Well...");

byte image82[8] = {B01000, B01000, B00100, B01100, B10100, B00010, B00001, B00000};
byte image83[8] = {B00000, B00000, B00000, B10001, B01110, B00000, B00001, B11110};
byte image84[8] = {B00100, B00100, B01010, B01001, B01000, B10000, B00000, B00000};
byte image86[8] = {B00000, B00000, B00000, B11110, B10001, B10000, B01000, B00100};
byte image87[8] = {B00000, B00000, B00000, B01111, B10001, B00010, B00100, B01000};
byte image88[8] = {B00000, B00000, B00000, B11111, B00000, B00000, B10001, B10001};


lcd.createChar(0, image82);
lcd.createChar(1, image83);
lcd.createChar(2, image84);
lcd.createChar(3, image86);
lcd.createChar(4, image87);
lcd.createChar(5, image88);


lcd.setCursor(12, 1);
lcd.write(byte(0));
lcd.setCursor(13, 1);
lcd.write(byte(1));
lcd.setCursor(14, 1);
lcd.write(byte(2));
lcd.setCursor(14, 0);
lcd.write(byte(3));
lcd.setCursor(12, 0);
lcd.write(byte(4));
lcd.setCursor(13, 0);
lcd.write(byte(5));
delay(2000);
lcd.begin(16, 2);
lcd.print("we'll pick");

byte image91[8] = {B01000, B01000, B00100, B01100, B10100, B00010, B00001, B00000};
byte image92[8] = {B00000, B00000, B00000, B10001, B01110, B00000, B00001, B11110};
byte image93[8] = {B00100, B00100, B01010, B01001, B01000, B10000, B00000, B00000};
byte image94[8] = {B00000, B00000, B00000, B11110, B10001, B10000, B01000, B00100};
byte image95[8] = {B00000, B00000, B00000, B01111, B10001, B00010, B00100, B01000};
byte image96[8] = {B00000, B00000, B00000, B11111, B00000, B00000, B00000, B11011};


lcd.createChar(0, image91);
lcd.createChar(1, image92);
lcd.createChar(2, image93);
lcd.createChar(3, image94);
lcd.createChar(4, image95);
lcd.createChar(5, image96);


lcd.setCursor(12, 1);
lcd.write(byte(0));
lcd.setCursor(13, 1);
lcd.write(byte(1));
lcd.setCursor(14, 1);
lcd.write(byte(2));
lcd.setCursor(14, 0);
lcd.write(byte(3));
lcd.setCursor(12, 0);
lcd.write(byte(4));
lcd.setCursor(13, 0);
lcd.write(byte(5));

delay(1000);
lcd.begin(16, 2);
lcd.print("It up later!");

byte image97[8] = {B01000, B01000, B00100, B01100, B10100, B00010, B00001, B00000};
byte image98[8] = {B00000, B00000, B00000, B10001, B01110, B00000, B00001, B11110};
byte image99[8] = {B00100, B00100, B01010, B01001, B01000, B10000, B00000, B00000};
byte image100[8] = {B00000, B00000, B00000, B11110, B10001, B10000, B01000, B00100};
byte image101[8] = {B00000, B00000, B00000, B01111, B10001, B00010, B00100, B01000};
byte image102[8] = {B00000, B00000, B00000, B11111, B00000, B00000, B00000, B11011};


lcd.createChar(0, image97);
lcd.createChar(1, image98);
lcd.createChar(2, image99);
lcd.createChar(3, image100);
lcd.createChar(4, image101);
lcd.createChar(5, image102);


lcd.setCursor(12, 1);
lcd.write(byte(0));
lcd.setCursor(13, 1);
lcd.write(byte(1));
lcd.setCursor(14, 1);
lcd.write(byte(2));
lcd.setCursor(14, 0);
lcd.write(byte(3));
lcd.setCursor(12, 0);
lcd.write(byte(4));
lcd.setCursor(13, 0);
lcd.write(byte(5));
delay(3000);
lcd.begin(16, 2);
lcd.print("Oh, so you want");
delay(1200);
lcd.begin(16, 2);
lcd.print("to play more?");
delay(1000);
lcd.begin(16, 2);
lcd.print("That's an idea.");
delay(2000);
lcd.begin(16, 2);
lcd.print("But I'm tired");


byte image103[8] = {B01111, B00010, B00100, B01000, B01111, B00000, B00000, B00000};
byte image104[8] = {B00100, B00010, B11111, B01000, B00100, B00000, B00000, B00000};
byte image105[8] = {B00000, B00000, B00100, B00010, B00001, B11111, B01000, B00100};


lcd.createChar(0, image103);
lcd.createChar(1, image104);
lcd.createChar(2, image105);


lcd.setCursor(13, 1);
lcd.write(byte(0));
lcd.setCursor(15, 0);
lcd.write(byte(1));
lcd.setCursor(14, 0);
lcd.write(byte(2));
delay(2000);
lcd.begin(16, 2);
lcd.print("So, if you want");
delay(2000);
lcd.begin(16, 2);
lcd.print("to play again");
delay(1500);
lcd.begin(16, 2);
lcd.print("press the");
delay(1500);
lcd.begin(16, 2);
lcd.print("RESET button");
delay(2000);
lcd.begin(16, 2);
lcd.print("So, bye bye!");
delay(1500);
lcd.begin(16, 2);
lcd.print("see ya later! (:");

}

Credits

mohammadsohail0008

mohammadsohail0008

42 projects β€’ 31 followers

Comments