#include int led = 7;// declaring the LED pin char ON = '1';// declaring that ONturnon is the char the will be recived. SoftwareSerial myserial(0, 1); void setup() { myserial.begin(9600); pinMode(led, OUTPUT); } void loop() { char chr = myserial.read();// chr will be equal to which the derial will read if (chr == ON) {// if the chr have the same value of ON, the LED will be ON. digitalWrite(led, HIGH); delay(100); } else { digitalWrite(led, LOW); } }