Interactive art homework week 7 part 1

For this assignment I was actually pretty scared to start on it as I honestly wasn't really sure what I was doing so I made sure to triple check everything before going. I think it is possible to say that I made something really simple but in all honesty I was very relieved that I actually made something that worked. I hope I will be able to tackly future assignments with a little bit more creativity but for this week I made a simple 'traffic light'.

Video:



The code:
void setup() {
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
}

void loop() {
  digitalWrite(2,HIGH);
  delay(1000);
  digitalWrite(2,LOW);
  delay(1000);
  digitalWrite(3,HIGH);
  delay(1000);
  digitalWrite(3,LOW);
  delay(1000);
  digitalWrite(4,HIGH);
  delay(1000);
  digitalWrite(4,LOW);
  delay(1000);

}

Comments