BanScie CT10 Bug Fix Exercise (Bug B) — Arduino Uno simulation

An interactive Arduino Uno circuit simulation you can run free in your browser on Velxio, by christopherraegigantana.

Components

Sketch code

/*
 * Bug B: This function compiles but... wait, it doesn't compile at all!
 * Fix the error on line with delay(500)
 */

const int ledPin = 13;

void setup() {
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  blinkLED(500);
}

void blinkLED(int delayMs) {
  digitalWrite(ledPin, HIGH);
  delay(delayMs);
  digitalWrite(ledPin, LOW);
  delay(delayMs);
  Serial.println("Blink complete");
}

More projects by christopherraegigantana