int led1 = 14;
int led2 = 27;
char input;
void setup() {
Serial.begin(115200);
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
}
void loop() {
while (Serial.available()) {
input = Serial.read();
Serial.println(input);
}
if (input == 'a') {
digitalWrite(led1, HIGH);
}
if (input == 'b') {
digitalWrite(led1, LOW);
}
}