२८) [5] Use the following sketch and hardware to darkin the leds that are lite up by the pot voltage setting Fill in mis

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

२८) [5] Use the following sketch and hardware to darkin the leds that are lite up by the pot voltage setting Fill in mis

Post by answerhappygod »

 1
1 (23.89 KiB) Viewed 22 times
२८) [5] Use the following sketch and hardware to darkin the leds that are lite up by the pot voltage setting Fill in missing code in the following sketch
5V w A3 100 -W- + 2.56 jok POT GND N 3 4 $ -6 가 9 bit & A V ♡ ♡ 390} 390 ND
int analogPin int ledCount int ledPins void setup() { for (int led=0; led<=ledCount; led++) { pinMode(ledPins[led], OUTPUT); } }//end setup void loop() { int sensor analogRead(analogPin); int ledLevel = map (sensor,0, 1023,0, ledCount); for (int led=0; led<=ledCount; led++) { if (led ledLevel) { digitalWrite(ledPins[led], HIGH); } else { digitalWrite(ledPins[led], Low); } }//end for }//end loop
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply