Question: Exercise 1 (Issues with variables). All the following sketches include minor errors that prevent > compilation and/or produce undesired behavior. Please correct each snippet of
Exercise 1 (Issues with variables). All the following sketches include minor errors that prevent > compilation and/or produce undesired behavior. Please correct each snippet of code and explain what was wrong with the original version.

2 47 /* Desired Behavior: print the numbers 0 to 255 exactly once */ 48 49 50 51 char i; //hint what limitations does this have? void setup() { i = 0; Serial.begin(9600); } 52 53 54 55 56 void loop() { Serial.println(i); i = i + 1; 57 58 59 60 if (i >= 256) { return; } 61 62 }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
