What happens to the LEDs when this code runs? int redPin-11; int greenPin-10; int blue Pin-6;...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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); } 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); }
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
The standard deviation of a stock's annual returns is 36.8%. The standard deviation of market returns is 25.4%. If the correlation between the returns of the stock and the market is 0.2, what is this...
-
re Regular Languages and Finite Automata (a) Let L be the set of all strings over the alphabet {a, b} that end in a and do not contain the substring bb. Describe a deterministic finite automaton...
-
1 Distributed Systems In a distributed electronic conference application each participant has a replica of a shared whiteboard. Only one user at a time may write to the whiteboard, after which the...
-
Write a film script using this title "The arrival". THE ARRIVAL' WRITE A FILM SCRIPT USING THIS, TITLE DUMBFOUND: ASTONISH, AMAZE E62-67 SIMILE A METAPHOR ALLITERATION LIST OF THREE A LINE FROM A...
-
In Exercises 1-2, show that T is a linear transformation by finding a matrix that implements the mapping. x1 ,x2,... are not vectors but are entries in vectors. 1. 2. T(x1,X2,X3, X4) = (x + 2x2, 0,...
-
Discuss the termination criteria of simulated annealing. How the result depends on the final temperature?
-
Go to the Internet and peruse the AICPA's "Catch Me If You Can" online fraud game.
-
On pages 279-280 are statements of earnings and financial position for Wexler Industries. Required a. Use professional judgment in deciding on the preliminary judgment about materiality for earnings,...
-
1-Los mtodos de costos de inventario son simplemente medios por los cuales los costos se asignan entre el inventario final y el ingreso de ventas. True False 2- En una economa de precios dec...
-
MayDay Movers uses the indirect method to determine net cash provided by operating activities. During 2017, MayDay experienced a decrease in accounts receivable of $10,000, an increase in accounts...
-
Roberts Company is considering an investment in equipment that is capable of producing more efficiently than the current technology. The outlay required is $2,233,333.The equipment is expected to...
-
How do advanced techniques in artificial intelligence and machine learning contribute to process modeling, and what are the potential benefits and risks of incorporating AI-based approaches in...
-
Provide comprehensive information, and examples if applicable to support your answer. In what ways do goals and objectives help managers control the organization?
-
Complete the following Statement of EU FIFO methods Farmers Ltd operates a process costing system. Details of process 1 are as follows: All materials used are added at the beginning of the process....
-
A harmonic travelling wave has the equation: y ( x , t ) = 0 . 0 1 cos ( 1 . 2 x - 1 1 . 5 t ) Where x and y are measured in m and t is measured in s . What is the wavelength of this wave? Your...
-
Amir has an outstanding application for permanent residence via the Provincial Nominee Program. Amir indicates that he has just been charged with domestic violence in India. He can't recall the exact...
-
Distinguish between the work performed by public accountants and the work performed by accountants in commerce and industry and in not-for-profit organisations.
-
If it takes 11 minutes to cook spaghetti in Ann Arbor, Michigan, and 14 minutes in Boulder, Colorado, how long would it take in Cuzco, Peru? Discuss ways to make the spaghetti more tasty. If you...
-
1. Reactant A has been unsuccessful in courting/dating reactant B because of a completing reaction. The matchmaker advises that the only way a will succeed is to raise the temperature. Is this a...
-
The following data were reported (from C. N. Hinshelwood and P. J. Ackey, Proc. R. Soc. [Lond]., A115, 215) for a gas-phase constant-volume decomposition of dimethyl ether at 504C in a batch reactor....
-
1.14 Euro Virtual's EPS Sensitivity to Exchange Rates (A). On January 15, 2015 the Swiss National Bank (SNB) decided to unpeg the franc, which was fixed at CHF1.20/ since 2011. Suppose the SNB was to...
-
1.15 Euro Virtual's EPS Sensitivity to Exchange Rates (B). Assume a major weather crisis hits Switzerland, reducing its agricultural and food industries and sub- sequently leading to a macroeconomic...
-
1.16 Euro Virtual's EPS and Euro Appreciation/Depre- ciation. Since its introduction in 2003, the euro has been fluctuating against major global currencies. a. What is the impact of 15% appreciation...
Study smarter with the SolutionInn App