Build it step by step
0 of 8 doneInstall the library
Add LiquidCrystal I2C.
Wire the display
VCC, GND, SDA to A4, SCL to A5.
Wire the buttons
D2 to D5, each to GND.
Upload the sketch
Four jobs with empty boxes appear.
Adjust the contrast
Turn the screw on the backpack.
Tick a job
Press its button.
Unplug and replug
The ticks come back.
Edit the jobs
Change the text list in the sketch.
How do you build a four-line to-do board?
A four-line text display lists four jobs with a button to tick each one off, a simple desk helper. You need Arduino Nano, 20x4 LCD with I2C backpack, Tactile push button 6 mm × 4 and Breadboard 830 Tie Points. It takes 8 steps and about 75 minutes.
- Level
- Beginner
- Time
- About 75 min
- Parts
- 4
Parts list
- Development BoardsBuyArduino Nano × 1
- DisplaysBuy
- SwitchesBuy
- PrototypingBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| LCD VCC | Nano 5V | I2C backpack |
| LCD GND | Nano GND | Common ground |
| LCD SDA | Nano A4 | I2C data |
| LCD SCL | Nano A5 | I2C clock |
| Button 1 | Nano D2 to GND | Ticks job 1 |
| Button 2 | Nano D3 to GND | Ticks job 2 |
| Button 3 | Nano D4 to GND | Ticks job 3 |
| Button 4 | Nano D5 to GND | Ticks job 4 |
Code
A 20 by 4 character display shows four lines of text, which is just enough for a short list of jobs. This sketch prints four jobs, each with an empty box, and every button ticks or unticks one job, with a cross in its box. The ticks are saved in the Nano memory with a call that writes only when something changes, so the list survives a power cut and the memory does not wear out. The jobs are in one list at the top of the sketch, so you can edit them without touching the rest of the code, but each text should be no longer than 16 letters to fit on the line next to the box. The display module is controlled over two I2C wires by a small backpack board, and its address is usually 0x27 or 0x3F. If the screen shows only boxes or nothing, turn the little contrast screw on the backpack. Reset all four jobs at midnight in a later version by adding a clock module, which makes this a nice daily habit tracker for a desk or a fridge door.
Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <EEPROM.h>
LiquidCrystal_I2C lcd(0x27, 20, 4); // try 0x3F if the screen stays blank
const char* JOBS[4] = {"Water the plants", "Check the post", "Charge the phone", "Read for 20 min"};
const int BTN[4] = {2, 3, 4, 5};
bool done[4];
bool wasDown[4] = {false, false, false, false};
void draw() {
for (int i = 0; i < 4; i++) {
lcd.setCursor(0, i);
lcd.print(done[i] ? "[x] " : "[ ] ");
lcd.print(JOBS[i]);
for (int k = strlen(JOBS[i]); k < 16; k++) lcd.print(' '); // clear the rest of the line
}
}
void setup() {
lcd.init();
lcd.backlight();
for (int i = 0; i < 4; i++) {
pinMode(BTN[i], INPUT_PULLUP);
done[i] = EEPROM.read(i) == 1; // restore the ticks after a power cut
}
draw();
}
void loop() {
for (int i = 0; i < 4; i++) {
bool down = (digitalRead(BTN[i]) == LOW);
if (down && !wasDown[i]) {
done[i] = !done[i];
EEPROM.update(i, done[i] ? 1 : 0); // written only when a tick changes
draw();
delay(30);
}
wasDown[i] = down;
}
}Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Power on | Four jobs, all unticked the first time |
| Press button 1 | Job 1 shows a cross |
| Press it again | Cross removed |
| Power cycle | Ticks remembered |
| Press all four | All four ticked |
If it does not work
Blank screen
Try address 0x3F and adjust the contrast screw.
Only boxes show
Contrast is too high or too low.
Button needs two presses
Check the wiring to GND.
Text is cut off
Keep each job to 16 letters.
Ticks not remembered
Check the EEPROM lines were not removed.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the four-line to-do board?
Arduino Nano, 20x4 LCD with I2C backpack, Tactile push button 6 mm × 4 and Breadboard 830 Tie Points.
How long does the four-line to-do board take to build?
About 75 minutes for a beginner maker, in 8 steps.
How do I know the four-line to-do board works?
Power on: Four jobs, all unticked the first time. Press button 1: Job 1 shows a cross. Press it again: Cross removed.
Blank screen: what should I check?
Try address 0x3F and adjust the contrast screw.
Only boxes show: what should I check?
Contrast is too high or too low.
Button needs two presses: what should I check?
Check the wiring to GND.
Text is cut off: what should I check?
Keep each job to 16 letters.
