Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What happens to the LEDs when this code runs? int redPin-11; int greenPin-10; int blue Pin-6; bool cl=1; bool c2=0; bool c3=1; void setup()
What happens to the LEDs when this code runs? int redPin-11; int greenPin-10; int blue Pin-6; bool cl=1; bool c2=0; bool c3=1; void setup() { pinMode (redPin, OUTPUT); pinMode (greenPin, OUTPUT); pinMode (blue Pin, OUTPUT); } void loop() { if( (cl!=c2) && (c2==c3) ) { analogWrite (redPin, 255); analogWrite (greenPin, 0); analogWrite (blue Pin, 0); } } } if (cl! c2 && c2!=c3) ) analogWrite (redPin, 0); analogWrite (greenPin, 0); analogWrite (blue Pin, 125); if ((cl=c2 && c2!=c3) ) analogWrite (redPin, 0); analogWrite (greenPin, 255); analogWrite (blue Pin, 0); { { if (cl=0 && c2==0 && c3==0) { analogWrite (redPin, 125); analogWrite (greenPin, 125); analogWrite (bluePin, 125); delay(1000); }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started