Variables in C Language. **Introduction** Variables are the fundamental building blocks of any programming language, including C. They serve as placeholders for storing data that a program manipulates, processes, and displays. Understanding how variables work in C is crucial for every programmer's journey. In this blog post, we'll take a comprehensive look at variables in C programming, covering their types, declaration, initialization, and scope. **Types of Variables in C** C supports several data types to cater to different kinds of data, such as integers, floating-point numbers, characters, and more. Here are some of the primary variable types in C: 1. int: Used for storing integer values. 2. float: Used for storing floating-point (decimal) values. 3. char : Used for storing single characters. 4. double : Used for storing double-precision floating-point values. 5. short and long : Modifiers used with int to create different sizes of integers. 6. unsigned : Used with...
LCD display with I2C Module.
Today we are going to write code on LCD display with I2C module. First we need the following hardware parts for this program.
Hardware:
- Arduino Board.
- Programming Cables.
- Jumper wires.
- LCD display (I2C module).
- Programming device (laptop/computer/mobile).
Software:
- Arduinodroid (Mobile).
- Arduino Ide (computer/laptop).
Code:
//Let's Try Itt
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{
lcd.init(); // initialize the lcd
lcd.init();
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(3,0);
lcd.print("Hello, world!");
lcd.setCursor(2,1);
lcd.print("Welcome To");
lcd.setCursor(0,2);
lcd.print("Let's Try Itt Web");
lcd.setCursor(2,3);
lcd.print("Power By Ec-yuan!");
}
void loop()
{
}
Connections:
- VCC == 5V
- GND == GND
- SDA == A4
- SCL == A5
When you complete all the following steps, then your project is ready .

Comments
Post a Comment