Page 15 - Manual Técnico Proyecto_Float
P. 15
case 0xE0E060BF: //Amarillo
AlumbraPicto(6, 255, 255, 0);
CambiarColorTodos(255, 255, 0);
Reproduce(libro, 6);
ApagaPictos();
break;
case 0xE0E070BF: //Azul
AlumbraPicto(7, 0, 0, 255);
CambiarColorTodos(0, 0, 255);
Reproduce(libro, 7);
ApagaPictos();
break;
case 0xE0E080BF: //Anaranjado
AlumbraPicto(8, 255, 100, 25);
CambiarColorTodos(255, 100, 25);
Reproduce(libro, 8);
ApagaPictos();
break;
}
}
CircuitPlayground.irReceiver.enableIRIn();
if (!digitalRead(A1)) libro = 1; // valida el libro seleccionado
if (!digitalRead(A2)) libro = 2;
if (!digitalRead(A3)) libro = 3;
}
void loop1() { // define, prepara y muestra colores en el tablero
int led = pictoN;
if (led != -1) {
float v = (sin(estado) + 1) / 2;
tablero.setPixelColor(led, red * v, green * v, blue * v);
estado += 0.01;
if (estado > PI)estado -= 2 * PI;
} else {
tablero.clear();
estado = -PI;
}
tablero.show();
delay(1);
yield();
}