Register your child for In-person Robotics Workshop on 28th April at DC, Tracy, CA. Reserve a Seat today!

tect-corner-img

Changing Values of LED’s


Author: Yashmit
Category: Robotics

Made a program which turns LEDs 1-6 slowly bright and then off. It goes through all values for a LED’s brightness, 0-255.

Today I learned how to change the value of LEDs using the special digital pins which can also take analog values(the ones with the curly line in front of the number on the Arduino). Using this new software I have learned I made it so that it changes between the LEDs using a while loop, which is also something new we learned today. When we were going through all the LEDs we turned the value from 0-255 for each of the LED to make it glow the brightest it can and then back down to 0. We did this for all of the LEDs. There were still some problems with the code though, the LEDs didn’t shut off fully they were still lightly glowing. So I added a “digitalWrite” to make it turn off fully. Also since the while loop was going through all of the pins and not just the ones I was using I made multiple while loops so it would only go through the pins I was using, the special digital pins.

 

 

VIDEO OF PROGRAM:

https://drive.google.com/file/d/17wGSfUgQ3d45vorC44SmLn3MigbCXYN0/view?usp=sharing

SETUP OF BOARD

The hardware I made

 

0 137

Leave a comment