Displaying Hello World on LCD : Learn Arduino

In this article we’ll learn displaying hello world on LCD; Interfacing 16x2 LCD with Arduino Uno and display some text on it. Writing Hello World pleases the gods of any new programming language that you want to learn. But in case of Arduino it is the LED blinking program that is generally written first. Any ways, Hello World can certainly be second if not the first so let’s roll!

Parts needed:

  1. Arduino Uno
  2. 16 x 2 LCD
  3. Some jumper wires

Approximate Cost: ₹ 125 ($ 2)

The Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include   

//Initialize LCD with interface pins
//Pin Description: REGISTER SELECT PIN,ENABLE PIN,D4 PIN,D5 PIN, D6 PIN, D7 PIN
LiquidCrystal lcd(0, 1, 8, 9, 10, 11);

void setup() {
//Initialize LCD's number of columns and rows (16,2)
lcd.begin(16, 2);
}

void loop() {
//Set the cursor to column 0, line 0
lcd.setCursor(0, 0);

lcd.print("Hello World to Circuitry!");

//Delay of 0.75 sec
delay(750);

//Shift data to the left
lcd.scrollDisplayLeft();
}

Finally check and upload the code. Read this article to know how to upload and run the code.

References:

  1. 16 x 2 LCD Datasheet
  2. My simulation of this project on Tinkercad
  3. Arduino Howto

An Introduction to Arduino Platform : Learn Arduino

Arduino is an open-source hardware prototyping platform. It is widely used today in electronics projects because it is easy to learn, simple in design, well documented and cheaper. We call it platform because it is both hardware circuit as well as piece of software, the IDE. It also has its own programming language. All these open-source components collectively makes the Arduino platform.

Bit of History: It all started at IDII, Ivrea, Italy in 2003 when some students at the institute started working on creating a low cost prototyping tool for digital projects. Arduino’s sturdy design tells us that it is created by design people and not hardcore electronics guys. You know how bad they are :P! The project witnessed steady rise in its popularity and today it has become the most popular prototyping tool.

Arduino Circuits: As of writing this there are 58 different types of Arduino circuits (simply referred to as Arduinos). You can choose from this variety of circuits the one which fits your application needs. The most popular of them is Arduino Uno.

Arduino IDE: This piece of software helps you write application logic with a fancy editor, compile it and burn it on the circuit board. It can be installed on Windows, Linux and Mac OS platforms. There is also a web based IDE (if you just want to try).

Arduino Programming Language: Arduino programs are called sketches. A sketch is divided into two parts setup() and loop(). Numerous built-in functions are available to make the job easy. The language is largely inspired by C, try to see the code displayed in IDE!

Arduino Culture and Community: Arduino has a strong community helping each other on forums and sharing project ideas. The official website itself is a great resource for learning basics. Arduino day is a world-wide event celebrated in April each year that brings together developers, enthusiasts, students, teachers and novices.

Suggested Reading:

  1. The Untold History of Arduino by Hernando Barragán
  2. Arduino - Products
  3. Arduino Language Reference
  4. Arduino Web Editor
  5. Arduino Forums
  6. Arduino Day at Department of Computer Science, KSKVKU
  7. Download this Article as PDF