Animation Studios Mechatron Robotics

Students Projects

Electronics

Arduino

Animation Studios Mechatron Robotics

Animation Studios Mechatron Robotics

Created By

  • Tusham Agarwal

    Tusham Agarwal

    My name is Tusham. I am extremely interested in making new codes every day and I have made a lot of projects here at Mechatron Robotics. I have learnt a lot here and developed my skills and I hope to make my parents proud by excelling in the Robotics field.

About This Project

A big hello to all the people who are viewing our project, this project is one of its kind in the whole world. This is Mechatron’s very own animation studio, and not only is this about viewing the animation, you can actually control it!! Yes, you read it right this is an animation program you can control(told you it was one of its kind).

Animation Studios Mechatron Robotics project uses an Arduino uno R3( microcontroller ), a LCD and some push buttons.This project is solely based on the concepts and logics of the Arduino and the LCD.

From the TEAM,

Ishaan and Tusham

Components Required

  • Arduino UNO
  • Alphanumeric LCD,16 X 2
  • Tactile switch ,Top Accucated

Schematics

In this image all the components with the connections are given

Animation Studios Mechatron Robotics

Code Of Project

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 
int cursor=7;
const int l=10, d=9, u=8, r=7;

byte customChar[] = {
  B01110,
  B01110,
  B00100,
  B11111,
  B10101,
  B00100,
  B01010,
  B11011
};
byte customCharright[] = {
  B00111,
  B00111,
  B00100,
  B00111,
  B00110,
  B00101,
  B01010,
  B01001
};
byte customCharleft[] = {
  B11100,
  B11100,
  B00100,
  B11100,
  B01100,
  B10100,
  B01010,
  B10010
};
byte customCharup[] = {
  B01110,
  B01110,
  B10101,
  B01110,
  B00100,
  B00100,
  B01010,
  B11011
};
byte left[] = {
  B00100,
  B00010,
  B00001,
  B11111,
  B11111,
  B00001,
  B00010,
  B00100
};
byte right[] = {
  B00100,
  B01000,
  B10000,
  B11111,
  B11111,
  B10000,
  B01000,
  B00100
};

void setup() {
  lcd.begin(16, 2);
  pinMode(l, INPUT);
  pinMode(r, INPUT);
  pinMode(u, INPUT);
  pinMode(d, INPUT);
  lcd.createChar(0, customChar);
  lcd.createChar(1, left);
  lcd.createChar(2, right);
  lcd.createChar(3, customCharright);
  lcd.createChar(4, customCharleft);
  lcd.createChar(5, customCharup);
  lcd.home();
  lcd.print("Mechatron");
  lcd.setCursor(8,1);
  lcd.print("Robotics");
  delay(2000);
  for(int i=0; i<16; i++)
  {
    lcd.clear();
    lcd.setCursor(i,0);
    lcd.write(byte(1));
    delay(50);
  }
  for(int i=16; i>=0; i--)
  {
    lcd.clear();
    lcd.setCursor(i,1);
    lcd.write(byte(2));
    delay(50);
  }
  lcd.clear();
}

void loop() {
  //lcd.clear();
  lcd.setCursor(cursor,0);
  lcd.write(byte(0));
  lcd.setCursor(4,1);
  lcd.print("Move Me");
  delay(20);
  if(digitalRead(r) == HIGH)
  {
    if (cursor>=0 && cursor<16)
    {
      cursor++;
      lcd.clear();
      lcd.setCursor(cursor,0);
      lcd.write(byte(3));
      delay(200);
    }
  }
  
  if(digitalRead(l) == HIGH)
  {
    if (cursor>=0 && cursor<16)
    {
      cursor--;
      lcd.clear();
      lcd.setCursor(cursor,0);
      lcd.write(byte(4));
      delay(200);
    }
  }
  if(digitalRead(u) == HIGH)
  {
    if (cursor>=0 && cursor<16)
    {
      lcd.clear();
      lcd.setCursor(cursor,0);
      lcd.write(byte(5));
      delay(200);
    }
  }
  if(digitalRead(d) == HIGH)
  {
      lcd.clear();
      lcd.setCursor(cursor,1);
      lcd.write(byte(0));
      delay(200);
    
  }
}
Share