int bait = 0; void setup() { Serial.begin(9600); pinMode(13, OUTPUT); } void loop() { if (Serial.available() > 0) { bait = Serial.read(); if(bait==97){digitalWrite(13, HIGH);} if(bait==98){digitalWrite(13, LOW);} } }