Skip to content

Adium1000/Make-A-Microcontroler-Blink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 2, 2026
622a7b4 · · Mar 2, 2026

History

2 Commits
Mar 2, 2026
Mar 2, 2026

Repository files navigation

Make a Microcontroller Blink

This tutorial will help you set up your microcontroller and run your first tiny script that makes your LED blink.

Components Needed

  • Here is the list of components needed:
Quantity Component
1 ESP32
1 LED
1 Breadboard
1 1K Resistor
2 Wires
1 USB Cable

1. Place the Microcontroller on the Breadboard

  • If you use a small microcontroller like RP2040, Arduino Nano, or ESP32, this step is essential. If you use an Arduino Uno, skip this step.
  • First, align your microcontroller pins with the breadboard holes.

  • Now gently push the microcontroller down.

  • Now the microcontroller is attached to the breadboard. Congrats!

2. Place a Resistor

  • Before that, we need to understand how a breadboard and a resistor work.

BB

  • This is a breadboard. It is good for prototyping before making a real design.
  • The breadboard has 3 main parts: power rails, terminal strips, and a center notch.
  • The power rails are on the left and right sides. They are usually connected to a power source like a battery.
  • The terminal strips are the small holes where your electronic components go. They are connected horizontally.
  • The notch divides the terminal strips so you can plug in components like LEDs or microcontrollers more easily.

resistor

  • Resistors protect your components, such as LEDs.

  • They come in many shapes and values.

  • In this project, we will use a 1kΩ resistor.

  • After plugging in the microcontroller, find two holes to place the 1kΩ resistor. It should look something like this:

res

3. Place an LED

  • Now it’s time to place the LED.
  • If you didn’t know, the longer leg is positive (anode) and the shorter one is negative (cathode).
  • Before placing the LED, bend the legs like this:

LED

  • Let’s cut the positive leg so it is the same length as the negative one.

ledcut

  • Now connect the positive leg to the closest hole that contains one end of the resistor.
  • Connect the negative leg to the negative power rail.

alt text

4. Wires

  • Now let’s connect the LED to the microcontroller.
  • First, connect a wire from the negative power rail to a GND pin on the microcontroller.

alt text

  • Second, connect a wire from the resistor to a GPIO pin (GPIO 26 in my case).

Gip

5. Set Up Arduino IDE for ESP32 (Similar for Most Microcontrollers)

Download Arduino IDE if you don’t have it yet:

https://www.arduino.cc/en/software/

Add an Additional Board Manager URL

Logo

-> Open File -> Preferencesrences
A window will open where you will find "Additional Board Manager URLs.""

Paste: https://espressif.github.io/arduino-esp32/package_esp32_index.json

Click OK.

Install ESP32 Boards

Logo

Click on the Board Manager button on the left and search for "ESP32." Install the library from Espressif.

Logo

Wait for the board to install.

Connect Your ESP Board and Select It

alt text Logo

Tools -> Board -> ESP32 Arduino -> ESP32C3 Dev Module (or the board you use) you use)

Select the Port

Logo

Tools -> Port -> Choose the COM port your ESP32 is connected to.ed to.

6. Blink Code

  • Upload this to your microcontroller:
const int ledPin = 26;


void setup() {
   pinMode(ledPin, OUTPUT);
}



void loop() {
   digitalWrite(ledPin, HIGH);
   delay(500);
   digitalWrite(ledPin, LOW);
   delay(500);
}}

alt text

And you're done! 🎉

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published