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.
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) |
-
Arduino IDE
https://bit.ly/ArduinoIDE_Installer
-
CH340 USB Driver
https://bit.ly/CH340_USB_Driver
Block Diagram | Pictorial Diagram |
---|---|
Wiring |
---|
The picture above explains that the 16x2 I2C LCD has :
• Columns -> • Rows -> • Bytes in each led matrix -> • Bits in each led matrix -> in each row there are |
#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
}
-
Open the
Arduino IDE
first, then open this project by clickingFile
->Open
:stickman_animation_lcd.ino
-
Board Setup
in Arduino IDEHow to setup the
Arduino Nano
boardClick
Tools
->Board
->Arduino AVR Boards
->Arduino Nano
-
Change Processor
in Arduino IDEClick
Tools
->Processor
->ATmega328P (Old Bootloader)
-
Install Library
in Arduino IDEDownload all the library zip files. Then paste it in the:
C:\Users\Computer_Username\Documents\Arduino\libraries
-
Port Setup
in Arduino IDEClick
Port
-> Choose according to your device port(you can see in device manager)
-
Before uploading the program please click:
Verify
. -
If there is no error in the program code, then please click:
Upload
. -
If there is still a problem when uploading the program, then try checking the
driver
/port
/others
section.
To easily create a LCD Custom Character, you can access the link below.
|
-
Download and extract this repository.
-
Make sure you have the necessary electronic components.
-
Make sure your components are designed according to the diagram.
-
Configure your device according to the settings above.
-
Please enjoy [Done].
Animation display-1 | Animation display-2 |
---|---|
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.
This application is my own work and is not the result of plagiarism from other people's research or work, except those related to third party services which include: libraries, frameworks, and so on.
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.