All pastes #2081896 Raw Edit

Stuff

public c v1 · immutable
#2081896 ·published 2011-09-21 18:28 UTC
rendered paste body
int a = 13; // LED pinint b = 10; // LED pinvoid setup() {             // Setup LED pins  pinMode(a, OUTPUT);  pinMode(b, OUTPUT);}void loop() {  // First: Gonna do this 5 times.  for ( int i = 0; i < 5; i++ ) {    // a ON, b OFF, 300ms duration    digitalWrite(a, HIGH);      delay(300);    // a OFF, b ON, 300ms duration    digitalWrite(a, LOW);    digitalWrite(b, HIGH);      delay(300);    // Just turning the lights off    // as a courtesy.    digitalWrite(b, LOW);  } // Hey, that happens to be useful    // since we want 'off' for 1s.  delay(1000);    // You're doomed to repeat this part  // forever. forever. forever. foreve  while(true) {    // a ON, b OFF, 50ms duration    digitalWrite(a, HIGH);    digitalWrite(b, HIGH);      delay(50);    // a OFF, b OFF, 50ms duration    digitalWrite(a, LOW);    digitalWrite(b, LOW);      delay(50);    // Lights are already off at the end    // of this operation. Yay!  }}