Programming Examples
Design a counter using an atmega microcontroller (like ATMEGA328P) using Arduino to display the number of entries per day in an office.
Design a counter using an atmega microcontroller (like ATMEGA328P) using Arduino to display the number of entries per day in an office.
Components Required:
- Arduino UNO
- LCD 16*2
- Ultrasonic sensor ( for distance measurement)
- Buzzer
- Breadboard
- Jumper wire for connections
- Resistor and potentiometer for LCD
#include<LiquidCrystal.h>
LiquidCrystal lcd (1,2,4,5,6,7);
void setup()
{ lcd.begin(16,2);
lcd.setCursor(5,0);
lcd.print("WELCOME");
lcd.setCursor(3,1);
lcd.print("TO MY CLASS");
delay(2000);
lcd.setCursor(5,0);
lcd.print("New Way");
lcd.setCursor(3,1);
lcd.print("Of Learning");
delay(2000);
lcd.clear();
}
void loop()
{
lcd.setCursor(2,0);
lcd.print("Arduino class");
lcd.setCursor(2,1);
lcd.print("INFOMAX COMPUTER ACADEMY");
delay(500);
lcd.clear();
lcd.setCursor(2,0);
lcd.print("Arduino class");
delay(500);
}
Output