Arduino Nano 16×2 LCD Mini Operating System
by devkrishnavhora in Circuits > Arduino
43 Views, 0 Favorites, 0 Comments
Arduino Nano 16×2 LCD Mini Operating System
Objective
The objective of this project is to create a simple user interface (UI) using an Arduino Nano and a 16×2 LCD.
The system allows the user to navigate through different menus using only two push buttons.
The project demonstrates how an Arduino can be used to create a menu-based interface similar to a small operating system.
Supplies
Arduino Nano
16×2 LCD Display
2 Push Buttons
Deshbot Shield
Downloads
Pin Connections
16×2 LCD
LCD PinArduino Nano
RS - A4
EN - A3
D4 - A2
D5 - A1
D6 - A0
D7 - D13
Push Buttons
ButtonArduino Nano
Button 1 - D10
Button 2 - D12
Both buttons are connected between the Arduino pin and GND.
The program uses the Arduino's internal pull-up resistors, so external resistors are not required.
Working Principle
When the Arduino Nano starts, the LCD displays a boot screen.
Example:
After loading:
The home screen then appears:
Pressing D12 opens the main menu.
Pressing D10 moves through the available options:
and:
Pressing D12 opens the selected option.
Main Menu
The Mini OS contains three main options:
Games
The Games menu contains:
Stopwatch
The stopwatch displays elapsed time.
Example:
About
The About page displays information about the project.
Reaction Game
The Reaction Game measures how quickly the user responds.
First:
After pressing D12:
After a random delay:
The user must press D12 as quickly as possible.
The Arduino calculates the reaction time using the millis() function.
Example:
This means the user's reaction time was approximately 342 milliseconds.
Guess Number Game
The Arduino generates a random number between 1 and 10.
The LCD displays:
Pressing D10 changes the selected number.
Pressing D12 submits the guess.
If the guess is smaller than the secret number:
If the guess is larger:
If the number is correct:
The Arduino then generates a new random number.
Stopwatch
The stopwatch uses the Arduino's millis() function to measure time.
Example:
Controls
D12:
Start / Stop
D10:
Reset
The stopwatch can measure time without using an external RTC module.
Software Used
The project is programmed using:
Arduino IDE
Programming language:
C++ / Arduino C++
The main library used is:
This library controls the 16×2 LCD in 4-bit mode.
Downloads
. Conclusion
The Arduino Nano 16×2 LCD Mini OS is a menu-based user interface project designed using an Arduino Nano and a 16×2 LCD.
With only two buttons, the user can navigate through menus, play games, use a stopwatch, and view system information.
The project demonstrates how state-based programming and LCD interfaces can be combined to create a simple embedded-system user interface.
It can also serve as a foundation for developing more advanced embedded systems and interactive electronics projects.