0% found this document useful (0 votes)
4 views

Lab Assignment 2

The document provides instructions for a lab assignment to create a circuit simulation using Tinkercad that controls LED brightness with a potentiometer. It lists the required components, provides a schematic and instructions, and hints for the code.

Uploaded by

mythemyaseen6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Lab Assignment 2

The document provides instructions for a lab assignment to create a circuit simulation using Tinkercad that controls LED brightness with a potentiometer. It lists the required components, provides a schematic and instructions, and hints for the code.

Uploaded by

mythemyaseen6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CMP3006- Lab Assignment 2

You need to create a simulation using the schematic below. Requirements are given.
You need to use Tinkercad to create your circuit and write suitable code to run your
simulation. When you finish your assignment, you need to upload a screenshot of the design
and code to a suitable assignment on the Itslearning system.

Hint: You can download screenshots of the design and code from Tinkercad.
Hint: Under the code part, you need to click on the Serial Monitor button to see the
output on Tinkercad.

Part 1
When you run your simulation, if you change the potentiometer, you can see the
output is change.
Requirements:

Quantity Component
1 Arduino Uno R3
1 10 kΩ Potentiometer
As required Wires

Schematic & Info:

• Connect the three wires from the potentiometer to your board. The first goes
from one of the outer pins of the potentiometer to ground. The second goes from
the other outer pin of the potentiometer to 5 volts. The third goes from the
middle pin of the potentiometer to the analog pin A0.
• When the shaft is turned all the way in the opposite direction, there are 5 volts
going to the pin and the input value is 1023. To scale the numbers between 0.0
and 5.0, divide 5.0 by 1023.0 and multiply that by analogRead() function return
value.
• You need to print analogRead() function return value and voltage. Example: 1023
--- 5.00

*Schematic and some information are taken from www.arduino.cc and www.tinkercad.com
Part 2
You need to combine Part 1 and in-class LED example to control LEDs.

Hint: You need to remove delay() functions from in-class LED example

*Schematic and some information are taken from www.arduino.cc and www.tinkercad.com

You might also like