Question: 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() 

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!