How to Fade a LED - Lesson #2

by lucascreator in Circuits > Arduino

14 Views, 1 Favorites, 0 Comments

How to Fade a LED - Lesson #2

1dab9950-ec37-48fe-a6b5-b23d303ab0c7.png

Have you ever wondered how Arduino became such a powerful tool for makers and hobbyists? In the second article of the Arduino for Beginners course, we’ll explore the inspiring story behind Arduino and some real-world applications that show its versatility. In the end, I'll guide you through your second project: making a red LED fade in and out using an Arduino UNO board.

Supplies

Downloads

Video Tutorial

The Untold Story of Arduino - Lesson 2

I've recently posted a video on YouTube explaining everything you can read in this article. You can watch it right above.

Introduction

From smart home systems to robotics, wearable tech to weather stations - countless modern innovations began as simple prototypes powered by Arduino.

However, how did this tiny board become the heart of the maker movement? And how can you, as a beginner, start building projects with it?

  1. In this article, we’ll take a closer look at:
  2. The origin story of Arduino
  3. Key milestones that shaped its evolution
  4. Real-world applications built with it
  5. A simple hands-on project to help you take your first step

Sound good? Let’s dive in!

The Origin of Arduino

7fb2ddee-8940-4410-9420-0a56f30ef28a.png
a6e836a8-bd35-4327-8c09-2f4bb7abb17b.png
7659ecf8-0837-455d-a5d3-308aecf82cb4.png
b6a4be60-c89a-4f2f-9e1d-c9fbb60fc148.png
4def6cec-ecfd-4340-976e-463068a36c33.png
1c694596-c935-4406-b046-e06912047556.png
f1dbeaf5-6ca8-49d6-8f10-b5110519c15a.png
549b18cc-fb9f-412c-bbe9-6f3946af5f98.png
1edeaffe-8c45-462b-9e59-b390e36a8bd6.png
7a32fd94-9a58-4e75-b16c-c37d5974cc88.png

Our journey begins in the early 2000s in Ivrea, a small town in northern Italy. There, a design school called the Interaction Design Institute Ivrea (IDII) was offering an innovative graduate program in interaction design - teaching students how to combine creativity, design, and technology to build intuitive products.

One of the professors, Massimo Banzi, believed there had to be a better way. Around the same time, his friend from MIT had created a beginner-friendly programming environment called Processing, designed for visual artists. This sparked an idea: what if there was a similar tool for electronics prototyping?

That’s when student Hernando Barragán developed Wiring, a platform that included both a simplified coding environment and a microcontroller board - an important step forward. But Banzi and a team of collaborators - David Cuartielles, Tom Igoe, and Gianluca Martino - took the concept even further.

  1. They designed a board that was:
  2. Affordable (costing around $30 - the price of a pizza back then)
  3. Plug-and-play
  4. Easy to use for beginners
  5. Fully open-source, allowing anyone to build on it

In 2005, the first official Arduino board was launched.

Key Milestones

Here’s a quick timeline of the key moments in Arduino’s history:

  1. 2002 : Problem identified at IDII
  2. 2003 : Hernando Barragán creates Wiring
  3. 2005 : First Arduino board released
  4. 2007-2010s : Arduino becomes a global phenomenon in schools, makerspaces, and hobbyist communities
  5. Today : Arduino supports a vast ecosystem of boards, tools, and cloud-connected devices

Where Is Arduino Used Today?

8cf53239-82ae-459d-9482-e293d313a19b.png
a8614721-f5cf-4081-b5fe-e31056c67dfc.png
a868cc49-0272-4288-998f-34905f0f1abc.png
fd964213-9489-4716-b46b-d99c20de8ec0.png
b13a9fb1-6344-4fc9-92ef-77905d97945a.png
1f09f6d9-bd2e-45de-8d2e-2a54b50a164e.png

Arduino is now a cornerstone of electronics education, rapid prototyping, and even commercial product development. Some real-world use cases include:

Smart Homes

  1. DIY smart door locks
  2. Custom lighting systems
  3. Voice-controlled devices

Wearable Tech

  1. Fitness trackers
  2. Heart rate monitors
  3. Interactive costumes

Robotics

  1. Line-following robots
  2. Autonomous vehicles
  3. Robotic arms

Environmental Monitoring

  1. Weather stations (temperature, humidity, air quality)
  2. UV detectors

Agriculture

  1. Smart irrigation systems
  2. Greenhouse automation

Entertainment

  1. LED installations
  2. MIDI controllers
  3. Escape room tech

And all of this started from an open-source board with a single microcontroller.

Your Second Arduino Project: a Fading LED

31026471-47a1-4fbf-8a09-eef4d1c09c1a.jpg
b96cf085-1df5-4eee-9044-90fe160a8108.jpg
fb2d3577-87a4-42bf-9b37-32662c55d418.jpg
a6963ea4-a9b8-4d6d-8dfc-1e09a3da322c.jpg

Now that you know where Arduino came from and what it can do - let’s build something together! This project is perfect for beginners, and you’ll only need a few components.

What You’ll Need

  1. DFRobot Arduino UNO Board
  2. DFRobot Digital Piranha LED Module - Red
  3. I/O Expansion Shield for Arduino V7.1
  4. USB Cable to connect your board to your computer
  5. Arduino Cloud Editor

All of these components are included in the MindPlus Arduino Coding Kit.

Special thanks to DFRobot for sponsoring this course and providing the MindPlus Arduino Coding Kit. They’re one of the top global suppliers of electronics kits and educational tools, and their continued support helps make projects like this possible.

The kit includes everything you need to follow along - with high-quality components, beginner-friendly modules, and even support for both block-based and text-based programming. If you're just getting started with Arduino, it's a great investment. Definitely check that out!

How to Set Up This Project

ce1ed001-21b5-43f8-89cb-26cb48b8ec62.jpg
9bd5c7b4-1669-42d3-8b97-673d77ba8540.jpg
7a205673-2a1f-4bcd-bc2d-160ef0d5e185.jpg
35115362-21b7-4866-8bf6-b07dd458bdc4.jpg
e4a28349-0d48-4729-8e06-9fa16822537e.jpg
62b0d819-85f4-43f2-a7b0-868b460228a1.jpg
f1da7c82-d574-46d1-b8a4-212d774c3240.jpg

So:

  1. Connect the red LED module to digital port 9 on the shield. Make sure to attach the wires to the right pins - green matched with green, red with red, and black with black.
  2. Plug the shield into your Arduino UNO.
  3. Connect the UNO to your computer via USB.

That’s it! No need for external resistors or breadboards.

Code

a8475906-87c0-490a-af3f-713dacf4f470.png

After that, open the Arduino Cloud Editor. Create a new sketch and go to Examples => Built-in => 01.Basics. Then click on Fade. You should see something like the image above.

If had trouble at finding this code or setting up the Arduino Cloud Editor, I explained how to do those things in the previous article: How to Blink a LED - Lesson #1.

I also attached the code file in the Supplies section.

Results

21268487-150c-49dc-b5ae-f59fad839d32.jpg
ac0e2b28-b8e9-4394-8721-69a1542fa881.jpg
95b1c51d-8652-43f1-a9ed-50fb646ddb88.jpg

After you upload the code, you'll observe the red LED fading in and out, as you can see on the images above.

Conclusion

This was your second Arduino project, but don’t worry - you’ll get the chance to get your hands dirty many, many more times throughout this course.

I didn’t explain the code used in today’s project (or in the first lesson) because we’ll dedicate specific lessons to learning how to code properly. We’ll break everything down step by step, so if the commands look confusing now, that’s totally okay.

I also skipped some of the electronics theory that would help you fully understand what’s happening under the hood. But don’t worry. We’ll cover those concepts in the upcoming lessons as well.

If you’re enjoying this so far, make sure to check out the entire 24-part series - each lesson includes both an article and a video:

  1. Read all the lessons
  2. Watch the full YouTube playlist

All extra materials, including schematics, diagrams, and source code, are available on the GitHub repository for this project.

The code used in this lesson can also be found at the beginning of this article, in the Supplies section.

Up Next

In the next lesson, we’ll dive into the coding environments we’ll be using during the course: the Arduino IDE and Mind+.

I’ll show you how they work, what you can do with them, and start introducing you to Arduino code, so you can finally begin to understand what’s going on inside that bunch of commands.

Thank you for reading, and I see you in the next class.