Find and fix the 5 compile-time errors and 5 runtime errors in the code below.
int led = 13;
void setup() {
pinMode(led, OUTPUT);
// Count to 10, but replace the number 5 with the word "five"
for ( i = 1; i >= 10; i++ ) {
if ( i = 5 ) {
Serial.println(five);
} else {
Serial.println(i);
}
}
}
void loop() {
int ms = 200;
// Make the LED flash faster and faster until it appears as
// a static light. Reset when the delay reaches 0 ms.
while ( ms > 0 ); {
digitalwrite(led, LOW);
delay(ms);
digitalWrite(1ed, LOW);
delay(ms);
ms -= 5
}
}
When the program is fixed, it should count from 1 to 10 in the Serial Monitor, replacing the number 5 with the string “five”. Additionally, the onboard LED, connected to pin 13, blink faster and faster until it appears to be constantly on before restarting the process again.
Hints: