Unit 1: System Warning Light

 

Code: 


// This tells the board what we are calling the component connected to Pin 8

#define GREEN_OP_SYSTEM 8

// The setup is run once at the start to get everything ready

void setup() {

  pinMode(GREEN_OP_SYSTEM, OUTPUT);    

}

// This loop puts the green light on for 10000 milliseconds, then off briefly

// 1000 milliseconds=1 second

// This is a loop; it will run indefinitely

void loop() {

  digitalWrite(GREEN_OP_SYSTEM, HIGH);

  delay(10000);                           

  digitalWrite(GREEN_OP_SYSTEM, LOW);   

  delay(100);                            

}

 

 

Notes: