Identify the bug and suggest how to fix it. (4) #define RED LED 30 #define GREEN_LED...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Identify the bug and suggest how to fix it. (4) #define RED LED 30 #define GREEN_LED 39 void setup() { } // put your setup code here, to run once: pinMode(RED LED, OUTPUT); pinMode(GREEN_LED, OUTPUT); Serial.begin(9600); void loop() { // put your main code here, to run repeatedly: digitalWrite (GREEN_LED, HIGH); Serial.println("Go!"); delay(4000); digitalWrite(RED_LED, HIGH); Serial.println("Slow Down!"); delay(1000); digitalWrite(GREEN_LED, LOW); Serial.println("Stop!"); delay(5000); Identify the bug and suggest how to fix it. (4) #define RED LED 30 #define GREEN_LED 39 void setup() { } // put your setup code here, to run once: pinMode(RED LED, OUTPUT); pinMode(GREEN_LED, OUTPUT); Serial.begin(9600); void loop() { // put your main code here, to run repeatedly: digitalWrite (GREEN_LED, HIGH); Serial.println("Go!"); delay(4000); digitalWrite(RED_LED, HIGH); Serial.println("Slow Down!"); delay(1000); digitalWrite(GREEN_LED, LOW); Serial.println("Stop!"); delay(5000);
Expert Answer:
Answer rating: 100% (QA)
Answer The bug in the provided code is in the definition of the macro constants R... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Working capital is needed till the firm gets cash on a sale of finished products. Explain the factors on which it depends.
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Discussion Post: Suppose you were considering investing in a Series I Bond. The bond will pay 5% interest. However, bond A compounds annually, and bond B compounds semiannually. Provide a detailed...
-
The lack of harmonized food-safety practices and standards is just one of the challenges faced by the food industry as it becomes more global. What other challenges face the food industry in an era...
-
Briefly explain what will happen to a bonds duration measure if each of the following events occur. a. The yield to maturity on the bond falls from 8.5% to 8%. b. The bond gets 1 year closer to its...
-
When is a team effective?
-
The Miller Corporation acquired 30% of the outstanding common stock of the Crowell Corporation for $160,000 on January 1, 2007 and obtained significant influence. The purchase price of the shares was...
-
www-awu.aleks.com/alekscgi/x/sl.exe/1o_u-IgNslkr7j8P3 A dartb O COUNTING AND PROBABILITY Probabilities of an event and its complement has 8 equally sized slices numbered from Some are grey and some...
-
Five people must be lifted on an elevator a distance of 100m. The work is found to be 341.2 KJ and the gravitational acceleration is 9.75m/s2. Determine the Average mass per person.
-
When making a budget, a recommended goal is to spend10% on utilities. In reality, household spending depends on economic levels. Households with incomes from$15,000to$20,000 spend over11% on...
-
UniSuper is an Australian superannuation fund that has been aggressively pursuing business in Eastern Europe since the Iron Curtain was lifted in 1989. Poland has allowed its currency's value to be...
-
Estimating Office Demand Suppose that the employment in a certain office market can be separated into three industries. There are 70,000 workers in Industry A and 75% of the workers are office...
-
In many countries, undergraduate education is fully subsided by the gov- ernment and entrance is guaranteed for everyone that enrolls. Suppose that the total cost of going to college for an...
-
PharmaTech Ltd is an Australian biopharmaceuticals company specializing in the development of new antibiotics for drug-resistant superbugs. PharmaTech Ltd acquired a 25-year pharmaceutical patent on...
-
20. [0/1 Points] DETAILS PREVIOUS ANSWERS HARMATHAP12 12.2.055. Because of job outsourcing, a town predicts that its public school population will decrease at the rate ON -400 x+144 where x is the...
-
By referring to Figure 13.18, determine the mass of each of the following salts required to form a saturated solution in 250 g of water at 30 oC: (a) KClO3, (b) Pb(NO3)2, (c) Ce2(SO4)3.
-
Affordable Art Company has a Print Division that is currently producing 100,000 prints per year but has a capacity of 150,000 prints. The variable costs of each print are \($28\), and the annual...
-
The Stallion Division of Motortown Motors had an operating income of \($675,000\) and net assets of \($2,700,000\). Motortown Motors has a target rate of return of 23 percent. Required a. Compute the...
-
The Worldwide Auditors Association is a professional association. Its current membership totals 97,600 worldwide. The association operates from a central headquarters in New Zealand but has local...
Study smarter with the SolutionInn App