#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2); // Initialize the library with the numbers of the interface pins
const int a=8; //Assigning pin 8 to a
const int b=9; //Assigning pin 9 to b
const int c=10; //Assigning pin 10 to c
const int d=11; //Assigning pin 11 to d
const int e=12; //Assigning pin 12 to e
const int f=13; //Assigning pin 13 to f
const int g=14; //Assigning pin 14 to g
void setup()
{
OUTPUT_PINS(); // calling output pins
LCD(); // calling function LCD to get output in LCD
Nine(); // calling function Nine to get output in seven segment display
}
void LCD() // function to print characters in LCD
{
lcd.begin(16,2); // Set up the LCD's number of columns and rows
lcd.print(" Nevindas.P "); // Print a message to the LCD
}
void Nine() // fuction to print number 9 in seven segment display
{
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, LOW);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
}
void OUTPUT_PINS() // function for setting assigned pins as an output
{
pinMode(a, OUTPUT);
pinMode(b, OUTPUT);
pinMode(c,OUTPUT);
pinMode(d, OUTPUT);
pinMode(e, OUTPUT);
pinMode(f, OUTPUT);
pinMode(g, OUTPUT);
}
void loop()
{
}