Alternating:
void setup() {
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(9, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(800);
digitalWrite(9, HIGH);
delay(800);
digitalWrite(13, LOW);
delay(500);
}
Changing Speeds:
void setup() {
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(9, HIGH);
delay(300);
digitalWrite(13, LOW);
delay(900);
digitalWrite(9, HIGH);
delay(900);
digitalWrite(13, LOW);
delay(300);
}
Count:
void setup() {
pinMode(13, OUTPUT);
Serial.begin(9600);
}
void loop() {
int count = 0;
No comments:
Post a Comment