Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5
Practical
Make Bar Graph using LEDs
Connect 10 LEDs to Digital pins on Arduino
Connect 1 potentiometer to Analog pin of Arduino
The LED should light up on the signal of potentio menter
2 Connection
3 Program Flow
• Initialize pins using array function
• Set pin mode using for loop • Inside voidloop(), set a variable to analogRead • Map value from 0-1023 to number of leds and save it variable “sens” • Make a loop for LED blink array using for loop • Inside that loop make a condition, if number of LED is less than “sens” value then make that LED HIGH • Else make LED LOW