Created
June 20, 2015 19:32
-
-
Save UlisesGascon/e05963566cc229587cd2 to your computer and use it in GitHub Desktop.
pptls - Human Choice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Definimos la eleccion del jugador y Arduino a cero. | |
String eleccionJugador = "vacio"; | |
// ==== EMPIEZA EL LOOP() ==== | |
void loop (){ | |
// El jugador define su elección a traves de los 5 botones. | |
if(digitalRead(boton1) == HIGH){ | |
eleccionJugador = "piedra"; | |
}else if(digitalRead(boton2) == HIGH){ | |
eleccionJugador = "papel"; | |
}else if(digitalRead(boton3) == HIGH){ | |
eleccionJugador = "tijeras"; | |
}else if(digitalRead(boton4) == HIGH){ | |
eleccionJugador = "lagarto"; | |
}else if(digitalRead(boton5) == HIGH){ | |
eleccionJugador = "spock"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment