ARDUINO TALLER PRACTICO DE ARDUINO - SEGUNDA EDICION | Page 58
Componentes a utilizar:
✓
✓
✓
✓
✓
✓
✓
Protoboard
Fuente
8 Led
Arduino
Cables Macho-Macho
Pulsadores
3 Display de 7 segmentos anodo comun
Codigo:
byte numero[12][7] =//Es un array de bits para mostrar diferentes valores en el display de 7
segmentos
{
{ 0, 0, 0, 0, 0, 0, 1 }, // 0
{ 1, 0, 0, 1, 1, 1, 1 }, // 1
{ 0, 0, 1, 0, 0, 1, 0 }, // 2
{ 0, 0, 0, 0, 1, 1, 0 }, // 3
{ 1, 0, 0, 1, 1, 0, 0 }, // 4
{ 0, 1, 0, 0, 1, 0, 0 }, // 5
{ 1, 1, 0, 0, 0, 0, 0 }, // 6
{ 0, 0, 0, 1, 1, 1, 1 }, // 7
{ 0, 0, 0, 0, 0, 0, 0 }, // 8
{ 0, 0, 0, 1, 1, 0, 0 }, // 9
{ 0, 1, 0, 0, 0, 0, 0 }, // G
{ 0, 0, 1, 1, 0, 0, 0 }, // P
};
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool LED_DE_DERECHA_A_IZQUIERDA = true;
bool DIRECION_PERMITIDA_LED = true;
const int JUGADOR_VERDE = 12;
const int JUGADOR_VERDE_META = 13;
58