Skip to content

Commit 7ef843e

Browse files
committed
feat(wokwi-lcd1602/lcd-uno): initial lcd1602 test
The screenshot of the lcd1602 is subject to change in the future, so the reference PNG will need to be updated.
1 parent 250109f commit 7ef843e

File tree

8 files changed

+68
-0
lines changed

8 files changed

+68
-0
lines changed

.github/workflows/wokwi-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
- name: ili9341-uno
3838
path: wokwi-ili9341/lcd-uno
3939
scenario: ili9341.test.yaml
40+
- name: lcd1602-uno
41+
path: wokwi-lcd1602/lcd-uno
42+
scenario: lcd1602.test.yaml
4043
- name: microsd-card-esp32
4144
path: wokwi-microsd-card/sd-esp32
4245
scenario: sd.test.yaml

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ This repository contains a set of test projects for many Wokwi parts. The tests
1515
- [STM32L0](./wokwi-dht22/dht22-stm32/)
1616
- wokwi-ili9341
1717
- [Arduino Uno](./wokwi-ili9341/lcd-uno/)
18+
- wokwi-lcd1602
19+
- [Arduino Uno](./wokwi-lcd1602/lcd-uno/)
1820
- wokwi-micro-sd
1921
- [ESP32](./wokwi-micro-sd/sd-esp32/)
2022
- wokwi-slide-potentiometer

wokwi-lcd1602/lcd-uno/diagram.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"version": 1,
3+
"author": "Uri Shaked",
4+
"editor": "wokwi",
5+
"parts": [
6+
{ "id": "uno", "type": "wokwi-arduino-uno", "top": 200, "left": 20 },
7+
{ "id": "lcd", "type": "wokwi-lcd1602", "top": 8, "left": 20 },
8+
{
9+
"id": "r1",
10+
"type": "wokwi-resistor",
11+
"top": 140,
12+
"left": 220,
13+
"attrs": { "value": "220" }
14+
}
15+
],
16+
"connections": [
17+
["uno:GND.1", "lcd:VSS", "black", ["v-51", "*", "h0", "v18"]],
18+
["uno:GND.1", "lcd:K", "black", ["v-51", "*", "h0", "v18"]],
19+
["uno:GND.1", "lcd:RW", "black", ["v-51", "*", "h0", "v18"]],
20+
["uno:5V", "lcd:VDD", "red", ["v16", "h-16"]],
21+
["uno:5V", "r1:2", "red", ["v16", "h-118", "v-244", "h50"]],
22+
["r1:1", "lcd:A", "pink", []],
23+
["uno:12", "lcd:RS", "blue", ["v-16", "*", "h0", "v20"]],
24+
["uno:11", "lcd:E", "purple", ["v-20", "*", "h0", "v20"]],
25+
["uno:10", "lcd:D4", "green", ["v-24", "*", "h0", "v20"]],
26+
["uno:9", "lcd:D5", "brown", ["v-28", "*", "h0", "v20"]],
27+
["uno:8", "lcd:D6", "gold", ["v-32", "*", "h0", "v20"]],
28+
["uno:7", "lcd:D7", "gray", ["v-36", "*", "h0", "v20"]]
29+
]
30+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: 'Arduino Uno ILI9341 Test'
2+
version: 1
3+
author: 'Test Author'
4+
5+
steps:
6+
- delay: 100ms
7+
- wait-serial: 'Display initialized'
8+
- take-screenshot:
9+
part-id: 'lcd'
10+
compare-with: 'screenshots/lcd1602.png'

wokwi-lcd1602/lcd-uno/platformio.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[env:uno]
2+
platform = atmelavr
3+
board = uno
4+
framework = arduino
5+
lib_deps =
6+
LiquidCrystal
7.42 KB
Loading

wokwi-lcd1602/lcd-uno/src/main.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include <LiquidCrystal.h>
2+
3+
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
4+
5+
void setup() {
6+
Serial.begin(115200);
7+
lcd.begin(16, 2);
8+
lcd.print("Hello Wokwi!");
9+
Serial.println("Display initialized");
10+
}
11+
12+
void loop() {
13+
}

wokwi-lcd1602/lcd-uno/wokwi.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[wokwi]
2+
version = 1
3+
firmware = '.pio/build/uno/firmware.elf'
4+
elf = '.pio/build/uno/firmware.elf'

0 commit comments

Comments
 (0)