const int ledVermelho = 12;
const int ledAmarelo = 11;
const int ledVerde = 10;
const int ledAzul = 9;
const int botaoVermelho = 7;
const int botaoAmarelo = 6;
const int botaoVerde = 5;
const int botaoAzul = 4;
const int chaveEsquerda = 3;
const int chaveDireita = 2;
void setup() {
Serial.begin(115200);
pinMode(ledVermelho, OUTPUT);
}
void loop() {
if(Serial.available() > 0){
String cmd = Serial.readString();
String l;
if(cmd=="l" or cmd=="L"){
digitalWrite(ledVermelho, HIGH);
}
else if(cmd=="d" or cmd=="D"){
digitalWrite(ledVermelho,LOW);
}
else{
Serial.println("comando invalido ("+cmd+")");
}
}
}