Arduino UNO multiples of 3 project for beginners

SCHEMATIC:

Hello thi is an arduino uno project for beginners.

This Arduino code demonstrates a simple embedded electronics project that utilizes a Liquid Crystal Display (LCD) to count from 1 to 100 while controlling an LED. The program initializes the LCD and displays a message prompting users to subscribe to the YouTube channel Easy Electronics for more tutorials on embedded systems.

In the setup() function, the LCD is configured for a 16x2 display, and an initial message is shown. The loop() function counts from 1 to 100, updating the display with the current count. Every time the count reaches a multiple of 3, the LED connected to pin 13 blinks on for one second, allowing users to see the visual feedback. After counting, the final count and the number of LED blinks are displayed on the LCD.

This project is ideal for beginners interested in learning about LCD interfacing, LED control, and basic Arduino programming. It provides a practical example of how to integrate these components in a fun and engaging way.

  • Arduino projects
  • Liquid Crystal Display (LCD)
  • LED blinking tutorial
  • Embedded electronics
  • Easy Electronics tutorials
  • Arduino programming for beginners
  • Electronics projects for beginners
  • LCD interfacing with Arduino
  • DIY electronics projects
  • Arduino LED control

Get full project from here: https://drive.google.com/file/d/143rSyeuJbVLbGrGWEER-oxs5EO3jjmTq/view?usp=drive_link

CODE:

#include<LiquidCrystal.h>

// visit my channel for embedded electronics tutorials: https://www.youtube.com/@EasyElectronics2
// Initialize the LCD, setting the pins connected to the LCD
LiquidCrystal lcd(12, 11, 5, 4, 3, 2, 10, 9, 8, 7);
// Define the LED pin
const int ledPin = 13;
// Define the LED blink counter
int ledBlinks = 0;

void setup() {
// Initialize the LCD display
lcd.begin(16, 2);
// Initialize the LED pin as output mode
lcd.print("Subscribe!!");
delay(1000);
pinMode(ledPin, OUTPUT);
// Clear the LCD display
lcd.clear();
// Display initial message
lcd.print("Counting to 100…");
}

void loop() {
for (int count = 1; count <= 100; count++) {
// Each time the counter is incremented, display it on the LCD
lcd.clear(); // Clear the LCD display
lcd.setCursor(0, 0);
lcd.print("Count: ");
lcd.print(count);

// Check if the count is a multiple of 3
if (count % 3 == 0) {
  // Turn on the LED
  digitalWrite(ledPin, HIGH);
  // Wait for one second so you can see the LED light up
  delay(1000);
  // Turn off the LED
  digitalWrite(ledPin, LOW);
  // Increment the LED blink counter
  ledBlinks++;
}

// Wait a bit before continuing to count so you can read the numbers on the LCD
delay(1000);

}

// After counting, display the final message
lcd.clear();
lcd.print("Done! Counted to 100");
lcd.setCursor(0, 1); // Move the cursor to the second line
lcd.print("LED Blinks: ");
lcd.print(ledBlinks);

// Stop the program
while (true);
}

Watch tutorial on my channel and subscribe:


Post a Comment

0 Comments