devancakra / Arduino-Nano-based-Designing-Stick-Man-Animation-on-LCD-Screen

Stick Man Animation on LCD Screen | Solo Project

Home Page:https://youtu.be/uweQGr-vYIQ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Open Source Love License: MIT GitHub last commit Project

Arduino-Nano-based-Designing-Stick-Man-Animation-on-LCD-Screen

Solo Project: Stick Man Animation on LCD Screen

LCD functions as a character viewer. Generally, the characters displayed are in the form of writing, but actually LCD can also display images, even LCD can also display an animation from the results of looping. The purpose of this project is to educate the public on how to make easy character customization on I2C LCD. This project has been implemented and takes approximately 1 day. The result of this project is Stick Man animation.



Project Requirements

Part Description
Development Board Arduino Nano V3
Code Editor Arduino IDE
Driver CH340 USB Driver
Communications Protocol Inter Integrated Circuit (I2C)
Programming Language C/C++
Arduino Library LiquidCrystal_I2C
Display LCD I2C (x1)
Other Components • Mini USB cable - USB type A (x1)
• Jumper cable (1 set)



Download & Install

  1. Arduino IDE

    https://bit.ly/ArduinoIDE_Installer
    

  2. CH340 USB Driver

    https://bit.ly/CH340_USB_Driver
    



Project Designs

Block Diagram Pictorial Diagram Wiring
Block-Diagram Pictorial-Diagram Wiring



Basic Knowledge

lcd-i2c

The picture above explains that the 16x2 I2C LCD has :

• Columns -> 16

• Rows -> 2

• Bytes in each led matrix -> 8

• Bits in each led matrix -> in each row there are 5



Scanning the I2C Address on the LCD

#include <Wire.h>

void setup() {
  Wire.begin();
  Serial.begin(9600);
  while (!Serial); // Wait for serial monitor
  Serial.println("\nI2C Scanner");
}

void loop() {
  int nDevices = 0;
  Serial.println("Scanning...");

  for (byte address = 1; address < 127; ++address) {
    // The i2c_scanner uses the return value of the Wire.endTransmission to see if a device did acknowledge to the address.
    Wire.beginTransmission(address);
    byte error = Wire.endTransmission();

    if (error == 0) {
      Serial.print("I2C device found at address 0x");
      if (address < 16) {
        Serial.print("0");
      }
      Serial.print(address, HEX);
      Serial.println("  !");

      ++nDevices;
    } else if (error == 4) {
      Serial.print("Unknown error at address 0x");
      if (address < 16) {
        Serial.print("0");
      }
      Serial.println(address, HEX);
    }
  }
  if (nDevices == 0) {
    Serial.println("No I2C devices found\n");
  } else {
    Serial.println("done\n");
  }
  delay(5000); // Wait 5 seconds for next scan
}



Arduino IDE Setup

  1. Open the Arduino IDE first, then open this project by clicking File -> Open :

    stickman_animation_lcd.ino


  2. Board Setup in Arduino IDE

    How to setup the Arduino Nano board

    Click Tools -> Board -> Arduino AVR Boards -> Arduino Nano


  3. Change Processor in Arduino IDE

    Click Tools -> Processor -> ATmega328P (Old Bootloader)


  4. Install Library in Arduino IDE

    Download all the library zip files. Then paste it in the: C:\Users\Computer_Username\Documents\Arduino\libraries


  5. Port Setup in Arduino IDE

    Click Port -> Choose according to your device port (you can see in device manager)


  6. Before uploading the program please click: Verify.

  7. If there is no error in the program code, then please click: Upload.

  8. If there is still a problem when uploading the program, then try checking the driver / port / others section.



LCD Custom Character

To easily create a LCD Custom Character, you can access the link below.

https://maxpromer.github.io/LCD-Character-Creator/



Get Started

  1. Download and extract this repository.

  2. Make sure you have the necessary electronic components.

  3. Make sure your components are designed according to the diagram.

  4. Configure your device according to the settings above.

  5. Please enjoy [Done].



Highlights

Animation display-1 Animation display-2
display-1 display-2



Appreciation

If this work is useful to you, then support this work as a form of appreciation to the author by clicking the ⭐Star button at the top of the repository.



Disclaimer

This application has been created by including third-party sources. Third parties here are service providers, whose services are in the form of libraries, frameworks, and others. I thank you very much for the service. It has proven to be very helpful and implementable.



LICENSE

MIT License - Copyright © 2024 - Devan C. M. Wijaya, S.Kom

Permission is hereby granted without charge to any person obtaining a copy of this software and the software-related documentation files to deal in them without restriction, including without limitation the right to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons receiving the Software to be furnished therewith on the following terms:

The above copyright notice and this permission notice must accompany all copies or substantial portions of the Software.

IN ANY EVENT, THE AUTHOR OR COPYRIGHT HOLDER HEREIN RETAINS FULL OWNERSHIP RIGHTS. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, THEREFORE IF ANY DAMAGE, LOSS, OR OTHERWISE ARISES FROM THE USE OR OTHER DEALINGS IN THE SOFTWARE, THE AUTHOR OR COPYRIGHT HOLDER SHALL NOT BE LIABLE, AS THE USE OF THE SOFTWARE IS NOT COMPELLED AT ALL, SO THE RISK IS YOUR OWN.

About

Stick Man Animation on LCD Screen | Solo Project

https://youtu.be/uweQGr-vYIQ

License:MIT License


Languages

Language:C++ 100.0%