Skip to main content

Posts

Arduino Push Button Toggle: Debouncing a Push Button to Control an LED

Recent posts

Arduino Push Button LED: Control an LED with a Push Button

Learn how to use a push button as a digital input and control an LED with an Arduino Uno R3. So far, we have used Arduino to control an LED in several different ways. In the previous three projects, we:  turned an LED ON and OFF. used PWM to control its brightness. changed the speed at which the LED blinked. Now, in this fourth project, we are going to introduce something new: an input. We will use a push button to tell the Arduino when to turn an LED ON or OFF. This project introduces the digitalRead() function, which allows the Arduino to read the state of a digital input. Arduino's digitalRead() function returns either HIGH or LOW. What You Will Learn After completing this project, you will understand: What a push button does in an electronic circuit. The difference between an input and an output. How to connect a push button to an Arduino. Why a pull-down resistor is used. How digitalRead() reads a digital input. How if and else statements control program behavior. How a...

Gradually Slowing LED Blink (Tired LED) - Beginner Tutorial

Learn how to make an LED blink rapidly at first and gradually slow down using Arduino. In our first Arduino project, Blink an LED, we learned how to turn an LED ON and OFF using digitalWrite() and control the timing with delay(). In our second project, Fade an LED, we learned how to use PWM to gradually change an LED's brightness. Now, in this project, we are going to use another simple programming concept:  changing the timing of a program while it is running. In this project, the LED will initially blink quickly. After each blink, the waiting time will gradually increase, causing the LED to blink more slowly - as though the LED is becoming tired. What You Will Learn After completing this project, you will understand: How to control an LED's blinking speed. How delay() controls the timing of an Arduino program. How a variable can store a changing delay value. How to increase a variable during program execution. How the same LED circuit can be controlled using different program...

Fade an LED Using PWM - Beginner Tutorial

Learn how to gradually increase and decrease an LED's brightness using an Arduino Uno R3 and Pulse Width Modulation (PWM). In our previous project, we learned how to turn an LED ON and OFF using an Arduino digital output. Now let's take the next step. Instead of simply switching the LED between ON and OFF, we will make it gradually increase and decrease in brightness. To accomplish this, we will use a technique called Pulse Width Modulation (PWM). This project introduces an important Arduino concept that will be useful in many future projects involving LEDs, motors, and other electronic components. What You Will Learn After completing this project, you will understand: What Pulse Width Modulation (PWM) is. Why a PWM-capable pin is required for this project. How analogWrite() controls PWM output. How PWM values from 0 to 255 affect the output. How variables can control LED brightness. How an if statement can reverse the direction of the fade. How to create a continuous fade-in a...

How to Blink an LED with Arduino Uno - Beginner Tutorial

Learn how to make an LED blink using an Arduino Uno R3, a 220 Ω resistor, and a simple Arduino sketch. Hello everyone! If you are familiar with programming, you have probably encountered the classic “Hello, World!” program. It is traditionally one of the first programs used to introduce programming because it demonstrates how a computer can execute a simple instruction. In physical computing, blinking an LED is often considered a similar first step. It introduces the fundamental idea of using software to control physical hardware. In this project, we will connect an external LED to an Arduino Uno R3 and program it to turn ON and OFF repeatedly. By the end of this tutorial, you will understand how to: Connect an LED safely to an Arduino. Use a resistor to limit current. Configure a digital pin as an output. Turn an LED ON and OFF using digitalWrite(). Control timing using delay(). Compile and upload an Arduino sketch. What You Need For this project, you will need: Arduino Uno R3 1 × LED...

Arduino VLC Media Player Control Using DIY IR Remote and Python

In the previous tutorial, we controlled VLC Media Player using sensors and serial communication. In this version, we will take the project a step further and build a DIY infrared (IR) remote controller using Arduino. By the end of this project, you will be able to sit back and control VLC Media Player just like a TV using your own custom-built remote. This tutorial also introduces an important concept in embedded systems and human-computer interaction: Using IR communication to control a computer application via Arduino and Python. This project is ideal for beginners who want to learn: IR communication with Arduino Decoding remote control signals Serial communication between Arduino and Python Automating PC applications using Python IR remotes are widely used because they are cheap, simple, and reliable for short-range wireless control of electronic devices. Project Overview We are building a two-part system: Part 01: Arduino Remote Reads button presses from a DIY IR remote tr...