int speakerPin = 8;
void setup() {
pinMode(speakerPin, OUTPUT);
}
void loop() {
digitalWrite(speakerPin, HIGH);
delay(1000);
digitalWrite(speakerPin, LOW);
delay(1000);
}
int speakerPin = 8;
void setup() {
pinMode(speakerPin, OUTPUT);
}
void loop() {
digitalWrite(speakerPin, HIGH);
delay(100);
digitalWrite(speakerPin, LOW);
delay(100);
}
int speakerPin = 8;
void setup() {
pinMode(speakerPin, OUTPUT);
}
void loop() {
digitalWrite(speakerPin, HIGH);
delay(1);
digitalWrite(speakerPin, LOW);
delay(1);
}
int speakerPin = 8;
void setup() {
pinMode(speakerPin, OUTPUT);
}
void loop() {
digitalWrite(speakerPin, HIGH);
delayMicroseconds(1);
digitalWrite(speakerPin, LOW);
delayMicroseconds(1);
}
int inputPin = 9;
int ledPin = 13;
void setup() {
pinMode(inputPin, INPUT);
pinMode(ledPin, OUTPUT);
}
void loop() {
if (digitalRead(inputPin) == HIGH) {
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
}
int inputPin = 5;
int speakerPin = 13;
void setup() {
pinMode(inputPin, INPUT);
pinMode(speakerPin, OUTPUT);
}
void loop() {
if (digitalRead(inputPin) == HIGH) {
digitalWrite(speakerPin, HIGH);
} else {
digitalWrite(speakerPin, LOW);
}
}
No hay comentarios:
Publicar un comentario