
Using LCD with Digispark USB to display text | Robojax
This project demonstrates how to interface a 1602 LCD screen with a Digispark microcontroller to display text messages. This is a fundamental skill in embedded systems, useful for creating custom displays for various applications. The Digispark's small size and low cost make it ideal for compact projects.
Project Ideas:
- Create a simple digital clock.
- Display sensor readings (temperature, humidity, etc.).
- Build a custom status indicator for a larger project.
- Develop a basic game with on-screen feedback.
Hardware/Components
The project uses a 1602 LCD screen (16 characters x 2 lines) (in video at 00:21), a Digispark microcontroller (either the USB or micro USB version – the wiring is largely the same, but the connection to the computer differs (in video at 00:34)), and jumper wires. The LCD screen includes an I2C communication module (in video at 00:56), a backlight, and a potentiometer to adjust the screen's brightness (in video at 01:31).

Wiring Guide
The wiring connections are as follows (in video at 02:09):
- LCD Ground to Digispark Ground
- LCD VCC to Digispark 5V
- LCD SDA to Digispark Pin 0
- LCD SCL to Digispark Pin 1
Code Explanation
The Arduino code uses the LiquidCrystal library. Crucially, you need to determine your LCD's I2C address using the I2C scanner (in video at 03:36). This address (typically a hexadecimal value like 0x3F, 0x27, or 0x38) must be entered in the code (in video at 03:29). The code also defines the number of columns (16) and rows (2) of the LCD (in video at 05:57). The setup()
function initializes the LCD and prints an initial message. The loop()
function continuously clears the LCD, prints "RoboJax" on the first line, and "Hello World!" on the second line (in video at 06:54), with a half-second delay between updates (in video at 07:46).
// ... (other code omitted) ...
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
// ... (other code omitted) ...
//This line sets the I2C address of the LCD
lcd.begin(16, 2); //This line sets the dimensions of the LCD
// ... (other code omitted) ...
Live Project/Demonstration
The video demonstrates the successful compilation and upload of the code to the Digispark (in video at 08:20). The LCD displays the programmed text, confirming the functionality of the circuit (in video at 08:48).
Chapters
- [00:01] Introduction
- [00:21] LCD 1602 Overview
- [01:06] Hardware Connections
- [02:09] Wiring Details
- [02:53] Code Overview
- [03:27] Finding the I2C Address
- [05:04] Uploading the Code
- [06:54] Code Explanation: Loop Function
- [08:20] Live Demonstration
Comments will be displayed here.