The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (2024)

Introduction

In this tutorial, we will learn how to use the Tinkercad platform for Arduino Simulation. Tinkercad is one of the best platforms for circuit building and simulation, mainly because of its user-friendly interface. This tutorial will serve as a basis for circuit building using Arduino in Tinkercad. So let’s get started by getting familiar with the Tinkercad platform.

Creating an Account in Tinkercad

The first step is to create an account in Tinkercad. You can access the website by clicking here.

After visiting the website, click on SIGN UP to create a new account. Alternatively, you can directly login if you already have an account.

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (1)

Next, click on CREATE A PERSONAL ACCOUNT to start with your account creation.

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (2)

After that, you will be provided with several options to create an account.

You can either sign-up using your email ID, or sign in using your Google/Apple ID.

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (3)

Once you sign in to the Tinkercad platform, you will be able to see the following interface.

Subsequently, click on the TINKER drop-down menu

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (4)

As a result, you will be able to see many options. In order to get used to the platform, click on LEARNING CENTER.

Here, you will get lots of tutorials on how to use various sections of the platform.

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (5)

Creating your first project

Now, in order to start making your circuit, click on the CIRCUITS option.

Following that, click on the CREATE NEW CIRCUIT option.

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (6)

Now, let us make a simple Arduino simulation to make an LED blink.

The right-most part is the components section. Firstly, type in Arduino in the search bar. Drag out the Arduino into the workspace.

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (7)

Similarly, choose a breadboard and an LED and drag them onto the workspace.

After placing the main components, the workspace would look as shown below. Click the ZOOM TO FIT (square icon) on the top-left to view the entire setup.

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (8)

Now before making the connections, there are a few things to keep in mind about the breadboard. The first and the last 2 rows are internally connected (indicated by the blue markings). These rows are used for connecting the power supply(+) and the ground(-).

The holes in the middle (marked from A to J) are internally connected column-wise (indicated by the red markings). We place the components and connect them with each other using these holes.

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (9)

Now, let’s start with the connections. Firstly, connect the cathode of the LED to the ground (GND) terminal of Arduino. Next, connect the anode of the LED to any of the digital pins (for eg. 9) of the Arduino. In order to limit the current flow through the LED, add a resistor (for eg. 1kΩ ) between the connection from the anode to the digital pin. The final setup would be as shown below

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (10)

Coding the Arduino

Now, let’s dive into the coding part. For coding the Arduino, Tinkercad provides us with 3 options – BLOCKS, BLOCKS+TEXT, and TEXT. In this tutorial, we will be focusing on the TEXT option i.e coding using C++.

First, click on the CODE option on the top right side of the interface. Then, select the TEXT option of the Edit mode. As a result, a default template code will be visible as shown below

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (11)

First, let’s look at the setup() function. The code that we write within the setup() function only runs once. Here, we use the pinMode() function to configure a pin as input/output. For our project, we configure pin 9 as the output by replacing the LED_BUILTIN with 9.

Next, let’s look at the loop() function. The code that we write within the loop() function keeps on getting executed until we stop the simulation. The digitalWrite() function is used to write (assign) a HIGH/LOW value to a pin. We do this in order to turn the LED ON/OFF respectively. Remember to replace the LED_BUILTIN parameter with the pin number (9).

We use the delay() function between the digitalWrite() functions in order to make the blinking action visible. So here, we use 1000 milliseconds as the delay time.

On making the necessary changes, the code will look as follows

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (12)

Now, we’re ready to go for our first simulation! Click on START SIMULATION on the top right side, and see the LED blink ON and OFF!

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (13)
The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (14)
The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (15)

Conclusion

So, we have successfully completed our first simulation project in Tinkercad. Also, if you are interested in knowing about the hardware implementation of blinking an LED using Arduino, you can click here. Hope that this tutorial was informative and worth your time.

Happy learning!

The Ultimate Guide to Arduino Simulation using Tinkercad - IoTEDU (2024)
Top Articles
Latest Posts
Article information

Author: Jamar Nader

Last Updated:

Views: 6172

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.