0% found this document useful (0 votes)
9 views2 pages

Arduino Contolador 3 Botones

The provided code is an Arduino sketch that sets up three output pins and one input pin. It continuously checks the state of the input pin and the output pins, turning them on or off in a sequence based on their states. The program uses delays to control the timing of the pin state changes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Arduino Contolador 3 Botones

The provided code is an Arduino sketch that sets up three output pins and one input pin. It continuously checks the state of the input pin and the output pins, turning them on or off in a sequence based on their states. The program uses delays to control the timing of the pin state changes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

#include<stdio.

h>

int pins[] = {8,9,10};


void setup() {
pinMode(4, INPUT_PULLUP);
for(auto x : pins){
pinMode(x, OUTPUT);

digitalWrite(x, LOW);

void loop() {

if(digitalRead(4) == LOW && digitalRead(10) == LOW && digitalRead(9) == LOW &&


digitalRead(8) == LOW){

digitalWrite(8, HIGH);

delay(150);

}
if(digitalRead(4) == LOW && digitalRead(10) == LOW && digitalRead(9) == LOW &&
digitalRead(8) == HIGH){

digitalWrite(9, HIGH);

delay(150);

}if(digitalRead(4) == LOW && digitalRead(10) == LOW && digitalRead(9) == HIGH &&


digitalRead(8) == HIGH){

digitalWrite(10, HIGH);

delay(150);

}if(digitalRead(4) == LOW && digitalRead(10) == HIGH && digitalRead(9) == HIGH &&


digitalRead(8) == HIGH){

for(auto x: pins){

digitalWrite(x, LOW);

}
delay(150);
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy