ROBOTIC EYES
VIDEO:
CODE:
//CREATIVE PRADEEP THE HOME OF ELECTRONICS//
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F, 16, 2);
int x = 0;
// the 8 arrays that form each segment of the custom numbers
byte LT[8] =
{
B00111,
B01111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111
};
byte UB[8] =
{
B11111,
B11111,
B11111,
B00000,
B00000,
B00000,
B00000,
B00000
};
byte RT[8] =
{
B11100,
B11110,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111
};
byte LL[8] =
{
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B01111,
B00111
};
byte LB[8] =
{
B00000,
B00000,
B00000,
B00000,
B00000,
B11111,
B11111,
B11111
};
byte LR[8] =
{
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11110,
B11100
};
byte UMB[8] =
{
B11111,
B11111,
B11111,
B00000,
B00000,
B00000,
B11111,
B11111
};
byte LMB[8] =
{
B11111,
B00000,
B00000,
B00000,
B00000,
B11111,
B11111,
B11111
};
void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
lcd.createChar(8,LT);
lcd.createChar(1,UB);
lcd.createChar(2,RT);
lcd.createChar(3,LL);
lcd.createChar(4,LB);
lcd.createChar(5,LR);
}
void loop(){
//LEFT EYE
lcd.setCursor(1, 0);
lcd.write(8);
lcd.write(1);
lcd.write(1);
lcd.write(1);
lcd.write(2);
lcd.setCursor(1, 1);
lcd.write(3);
lcd.write(4);
lcd.write(4);
lcd.write(4);
lcd.write(5);
//NOSE
lcd.setCursor(7,1);
lcd.write(4);
//RIGHT EYE
lcd.setCursor(9, 0);
lcd.write(8);
lcd.write(1);
lcd.write(1);
lcd.write(1);
lcd.write(2);
lcd.setCursor(9, 1);
lcd.write(3);
lcd.write(4);
lcd.write(4);
lcd.write(4);
lcd.write(5);
}
CIRCUIT DIAGRAM:
CHANNEL LINK: https://youtube.com/c/CreativePradeep
Comments
Post a Comment