Introduction

In this tutorial, we will learn how to make a simple Arduino blinking LED circuit using Tinkercad Autodesk. This project is ideal for beginners who want to get started with Arduino programming and electronics. The circuit will consist of an Arduino board and an LED, and the code will control the blinking of the LED.

Arduino Tutorial 1 – How to Make Arduino Blinking LED Using Tinkercad Autodesk

Materials Required

To create a blinking LED using Arduino on Tinkercad Autodesk, you will need the following materials:

Arduino board

LED

Resistor

Hardware Setup

Choose the LED color by clicking on it and selecting from the six available colors. For this tutorial, we will choose green.

Adjust the resistance of the resistor to 220 ohms.

Connect the anode of the LED to the resistor.

Connect the other end of the resistor to pin number 13 on the Arduino.

Connect the cathode of the LED to the ground.

Code Implementation

In the code editor, select the “Text” option as we will be writing the code manually.

Delete the existing code as it is not needed for this tutorial.

In the void setup function, write the following code: pinMode(13, OUTPUT);

In this line of code, we are setting pin number 13 as an output pin. This means that pin 13 will provide power to the LED.

In the void loop function, write the following code: digitalWrite(13, HIGH);

In this line of code, we are turning pin number 13 on, which will turn on the LED.

Add the following line of code after the previous one: delay(1000);

This line of code introduces a delay of 1000 milliseconds (1 second) before the next instruction is executed.

Finally, add the following line of code: digitalWrite(13, LOW);

This line of code turns off the LED by turning off pin number 13.

By following these steps and using the given code, you will be able to create a blinking LED using Arduino on Tinkercad Autodesk. You can experiment with different colors and resistor values to customize your project. Have fun exploring the world of Arduino!

Arduino Tutorial 1 – How to Make Arduino Blinking LED using Tinkercad Autodesk

Circuit Setup

Before we dive into the code, let’s set up the circuit. Connect the positive leg of the LED to pin 13 of the Arduino board and the negative leg to the ground. Make sure the connections are secure.

Arduino Code Explanation

Now let’s understand the code that will make our LED blink. Open the Arduino IDE and create a new sketch. Copy and paste the following code:

“`html

Const int LED_PIN = 13;

Void setup() {

PinMode(LED_PIN, OUTPUT);

}

Void loop() {

DigitalWrite(LED_PIN, HIGH);

Delay(1000);

DigitalWrite(LED_PIN, LOW);

Delay(1000);

}

“`

Code Explanation

The code starts by defining a constant variable `LED_PIN` with a value of 13. This indicates that we are using pin 13 to control the LED.

In the `setup()` function, we set the `LED_PIN` as an output pin using the `pinMode()` function. This ensures that the Arduino knows the pin is used to control an output device.

The `loop()` function is where the LED blinking happens. The `digitalWrite()` function is used to set the `LED_PIN` to `HIGH`, which turns on the LED. We then use the `delay()` function to pause the program for 1000 milliseconds, which is equivalent to one second.

After the delay, we use `digitalWrite()` again to set the `LED_PIN` to `LOW`, turning off the LED. We then introduce another delay of 1000 milliseconds to keep the LED off for one second. This process will repeat indefinitely as the code is inside the `loop()` function.

Testing the Circuit

Now it’s time to test our circuit. Make sure the Arduino board is connected to your computer and upload the code to the board. If there are no errors, you should see the LED blinking on and off at a one-second interval.

Feel free to experiment with the code by changing the delay timings or using different pins to control the LED. This will help you gain a better understanding of how Arduino programming works.

Congratulations! You have successfully created an Arduino blinking LED circuit using Tinkercad Autodesk. This simple project opens the doors to more complex Arduino projects and provides a solid foundation for learning electronics and programming. Have fun exploring Arduino and its vast possibilities!

Share.
Exit mobile version