ITELEC3207 - Module1 - Virtual Arduino
ITELEC3207 - Module1 - Virtual Arduino
1. Explore the parts and use of the TinkerCad circuit interface window; and
2. Practice breadboarding and coding using TinkerCad.
What is TinkerCad?
• TinkerCad is a free online application for 3D design, electronic circuit, and coding.
Introduce by Autodesk, a global leader in design and make technology.
TinkerCad Circuit
• It is a component of the TinkerCad application, which enables educators, learners,
hobbyists, and designers to build and evaluate concepts electronically.
• Students may explore, connect, and code virtual designs using interactive circuit
editor and an endless toolkit of simulated components.
• It allows users to build and simulate Arduino projects without the requirement for
actual hardware.
Exploring TinkerCad
1. On the left side of the screen is your menu.
2|Page
2. On the upper left corner of the screen, click the “+ New” button then select “Circuit”.
3. Congratulations! You may now create your first TinkerCad circuit project.
3|Page
TinkerCad Project 1: Blinking LED
Code: On the upper left part of the screen, click the Code editor. Choose Text as edit
mode. Write the codes as shown below.
Note: Each line is ended with a semicolon (;).
pinMode (pin, <INPUT/OUTPUT >)
sets the pin to either INPUT or OUTPUT mode
digitalWrite (pin, <HIGH/LOW>)
switches ON (HIGH) or OFF (LOW) the LED on the pin
delay (time interval)
takes time interval in milliseconds (ex. delay (1000) – 1 second wait
Once done with the code, click the Start Simulation button beside the Code
editor button.
4|Page
Project 2: Pushbutton to control LED
Code: On the upper left part of the screen, click the Code editor. Choose Text as edit
mode. Write the codes as shown below.
digitalRead (pin)
This function is used to read the
value from a specified digital pin,
either HIGH or LOW.
5|Page
Project 3: Potentiometer to control LED
Code: On the upper left part of the screen, click the Code editor. Choose Text as edit
mode. Write the codes as shown below.
6|Page
map (value, fromLow, fromHigh, toLow, toHigh)
Re-maps a number from one range to another. That is, a value
of fromLow would get mapped to toLow, a value of fromHigh to toHigh,
values in-between to values in-between, etc. It uses integer math so will not
generate fractions, when the math might indicate that it should do so.
Fractional remainders are truncated, and are not rounded or averaged.
analogWrite (pin, value)
Writes an analog value to a pin. Can be used to light a LED at varying
brightness’s or drive a motor at various speeds.
Once done with the code, click the Start Simulation button beside the Code
editor button.
7|Page
Code: On the upper left part of the screen, click the Code editor. Choose Text as edit
mode. Write the codes as shown below.
References
• Lady A. Breadboards for Beginners. Adafruit. Retrieved last January 18, 2023 from
https://learn.adafruit.com/breadboards-for-beginners/
• Science Buddies. How to Use a Breadboard for Electronics and Circuits. Science
Buddies Org. Retrieved last January 18, 2023 from
https://www.sciencebuddies.org/science-fair-projects/references/how-to-use-a-
breadboard
• Atlearner. How to use breadboard? Beginner’s Guide. Atlearner. Retrieved last
January 18, 2023 from https://www.atlearner.com/2019/08/How-to-use-a-
breadboard.html
• Arduino. Language References. Retrieved last January 19, 2023 from
https://www.arduino.cc/reference/en/
• Arduino. How to Wire and Program a Button. Retrieved last January 19, 2023 from
https://docs.arduino.cc/built-in-examples/digital/Button
• Arduino. Basics of Potentiometers with Arduino. Retrieved last January 19, 2023
from https://docs.arduino.cc/learn/electronics/potentiometer-basics
• Primerobotics in Circuits. 7-segment Display Using Arduino Uno R3. Autodesk
Instructables. Retrieved last January 19, 2023 from https://www.instructables.com/7-
segment-Display-Using-Arduino-Uno-R3/
8|Page