Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elements Of Chemical Reaction Engineering

Authors: H. Fogler

6th Edition

013548622X, 978-0135486221

More Books

Students also viewed these Programming questions

Question

2. Why is tPA not recommended in cases of hemorrhage?

Answered: 1 week ago

Question

1. What are the two kinds of stroke and what causes each kind?

Answered: 1 week ago