ATLS3300-2021-NINO-P3

by NinoZhang in Circuits > Arduino

154 Views, 0 Favorites, 0 Comments

ATLS3300-2021-NINO-P3

IMG_0593.jpg

CU boulder

ATLS 3300 - 001

2021

Nino

This project is for the class ATLS 3300 - 001 at CU Boulder.

Materials

Wire * many

breadboard * 1

Resistor * 2

potentiometer * 1

button * 1

Arduino * 1

Connect the Potentiometer

IMG_0591.jpg

connect the potentiometer with the power, ground, and analog input on the Arduino.

The power supply should be the highest voltage output on your Arduino which is 5V.

Connect Button

IMG_0592.jpg

Connect button with power with the button, and ground it with a resistor.
Connect a digital input on Arduino to the button.

Connect the LED

IMG_0593.jpg

Connect the LED with a PWM output on the board and ground it with a resistor.

(My resistor's resistance is too low so I'm using two resistors here.)

Add Code

IMG_0594.jpg

If the code is running correctly, you should able to control the LED with a button and potentiometer.

The button should able to control On and Off, and the potentiometer should able to control the brightness.