1 Arduino Uno (We will be using the SparkFun RedBoard Inventor's Kit)
1 USB A-to-B Cable
Computer with Internet Access
1 Breadboard
16 Jumper Wires
1 Rotary Potentiometer
1 330Ω Resistor
1 LCD
An Arduino is one of the most popular open-source physical programmable circuits (often referred to as a microcontroller) for use in a wide range of projects both physical and virtual. The Arduino board is coupled with a piece of software, known as the IDE (Integrated Development Environment) which runs on your computer and allows programs to be written and uploaded via your computer to the physical Arduino board. This IDE runs on a simplified version of C++, which makes learning programming easier and allows programming knowledge to be accessible to students everywhere.
Starting with their first Arduino board in 2005, over 26 different board types (most notably Arduino Uno, Arduino Due, Arduino Mega, and Arduino Leonardo) have been created with the intention of making prototyping projects in the physical world much simpler. Today we will be using the SparkFun RedBoard, which is an Arduino Uno knockoff from SparkFun.
Along with the Arduino, we will produce a visual (text) on an LCD (Liquid-Crystal Display). These displays do not produce light directly and are aided by a backlight to make the text appear. LCDs are widely used, with applications in televisions, heads-up displays, electronic watches, computer monitors, and mobile phones. However, they are quickly being replaced by LED (light-emitting diode) and OLED (organic light-emitting diode) screens, which are more versatile as they can be in many different shapes and sizes while having a wider range of colors and a quicker response time.
Arduino (board) - open-source physical programmable circuits (often referred to as a microcontroller) for use in a wide range of projects both physical and virtual.
Microcontroller - a compact integrated circuit designed to govern a specific operation in an embedded system. Can sometimes act as a miniature computer with limited output capabilities.
Arduino IDE (software) - a cross-platform application (for Windows, macOS, Linux) that is written in functions from C and C++. It is used to write and upload programs to Arduino compatible boards.
Breadboard - a board for making an experimental model of an electric circuit.
C++ - a high-level, general-purpose programming language.
Ohm (Ω) - the unit used when determining resistance in an electrical circuit.
Resistor - a nonpolar electrical component that resists the flow of a circuit and limits current.
LCD - Liquid-Crystal Display; a flat-panel display or other electronically modulated optical device that uses the light-modulating properties of liquid crystals combined with polarizers to produce an image.
LED/OLED Screen - Light-Emitting Diode/Organic Light-Emitting Diode screen; a video display which uses light-emitting diodes.
Compile - convert (a program) into a machine-code or lower-level form in which the program can be executed. The program will also be checked for bugs and errors.
For this project, you will need 1 SparkFun Redboard Inventor's kit, which includes all necessary components.
If this kit is unavailable, you can buy all of the materials separately as listed above.
Although jumper wire colors are not important in making simple circuits, it is good practice for major projects to follow color codes: red for positive, black for negative, and other colors to denote where data is flowing to and from. If you would like to follow the color conventions, the number of each colored wire goes as follows: 5 black wires, 4 red wires, 2 green wires, 2 blue wires, 2 orange wires, and 1 yellow wire.
Go to https://www.arduino.cc/en/Main/Software and install the Arduino IDE software for use on your computer. If you do not have an Arduino or the Arduino IDE does not work on your device, you can follow along digitally by creating an Arduino circuit at https://www.tinkercad.com/circuits.
Once the IDE is installed, you will need to connect your Arduino to your computer. To do this, plug one end of the USB cable to the Arduino Uno and then the other end of the USB to your computer’s USB port.
Once the board is plugged in, you will need to open the IDE and click on Tools > Board > Arduino Uno to select the board.
Next, you have to tell the Arduino which port you are using on your computer. To select the port, go to Tools > Port and then select the port that says Arduino.
Plug one red wire into the 5V port on the Arduino board and the positive terminal (+) on the breadboard. Plug one black wire into the ground (GND) port on the Arduino board and the negative terminal (-) on the breadboard.
Connect the LCD with its bottom port (GND) plugging into J30 and its top port (LED) plugging into J15. Connect one red wire from the positive terminal (+) to f29 and one black wire from the negative terminal (-) to f30.
Connect the potentiometer with its right leg in A6, middle leg in A7, and left leg in A8. Connect one red wire from the positive terminal (+) to E6, one blue wire from E7 to F28, and one black wire from the negative terminal (-) to E8.
Connect a green wire from F27 to port 12 on the Arduino board, a black wire from F26 to the negative terminal (-), and an orange wire from F25 to port 11 on the Arduino board.
Connect a yellow wire from port 5 on the Arduino board to F20, an orange wire from port 4 on the Arduino board to F19, a blue wire from port 3 on the Arduino board to F18, and a green wire from port 2 on the Arduino board to F17.
Connect a 330Ω Resistor with one leg on the positive terminal (+) and one leg in A14. Connect a red wire from B14 to F16, and a black wire from the negative terminal (-) to F15.
The resistor here keeps the current to the backlight limited. Without this resistor, the backlight may become overpowered and explode.
Download the sample code here: https://tinyurl.com/rkgaajo
Click the checkmark icon to compile your sketch, and the right arrow icon to upload to your Arduino board. As soon as you upload the code, the LCD will turn on!
If the LCD does not light up or has become too bright, turn the potentiometer until the text appears. This knob acts as a backlight dimmer.
While this code simply prints "hello, world!" on the top line and a seconds-counter on the bottom line, you can change the text that appears by doing some simple programming. Open up the Arduino IDE and find where the code calls lcd.print("hello, world!"); within the void setup() function and change "hello, world" to anything you'd like! There is a character limit of 16 characters per line, so beware of cut off words.
If you would like to add text to the bottom row, or mess around with the counter itself, find the lcd.print call within the void loop() function. Change millis() / 1000; (the counter that counts in milliseconds then divides by 1000 to find seconds) to either a new text call (remember to use quotation marks!) or tinker around with the numbers within the counter.