Вы находитесь на странице: 1из 4

Table of Contents

Name of the Experiment: Controlling the brightness of LED with analog and digital data. .......... 2
Objectives........................................................................................................................................ 2
Instruments ..................................................................................................................................... 2
Circuit Connection........................................................................................................................... 2
Description: ..................................................................................................................................... 3
Coding ............................................................................................................................................. 4
Conclusion ....................................................................................................................................... 4

1|Page
Name of the Experiment: Controlling the brightness of LED with analog and
digital data.

Objectives
The main objective of this experiment is to connect the Arduino Uno board with the computer and
breadboard run the code to control the brightness of LED with analog and digital data. The
objectives can be described formally as follows.
 Controlling the brightness of LED with analog data
 Controlling the brightness of LED with digital data

Instruments
 A Computer (Windows, Mac or Linux)
 An Arduino Uno Board
 A USB A-to-B Cable
 A breadboard
 An LED
 Connecting wires

Circuit Connection
 Connect the external LED to the breadboard
 Connect one leg of the LED to the pin no 13 of the Arduino Uno board
 Connect another leg of LED to the GND pin of the Arduino Uno board

2|Page
Description:
 Open the Arduino IDE by clicking on the Arduino icon.
 Connect the Arduino Uno board with the computer using the USB cable
 Go to Tools > Board > Arduino Uno to select the connected board in the IDE
 Go to Tools > Port > COM1 to select the right serial port.
 Go to File > New
 This will open a new window with some codes on it.
 In void setup ( ) function we set digital pin 13 as an output by the line of code pinMode
(13, OUTPUT)
 Write the required code
 click on the Tick icon on the IDE to compile the code
 To run this code we select Sketch > Upload
Observation:
We can observe that the brightness of the LED is changing over time. It is fading away and
again becoming bright according to the given data.

3|Page
Coding

Conclusion
In this experiment we have successfully connected the Arduino Uno board with the computer and
we have been able to control the brightness of the LED using the given data in the code.

4|Page

Вам также может понравиться