/*Application: Interface Author: Guadalupe Nieves Choque Choque*/ #include #define pin_tx 7 #define pin_rx 8 SoftwareSerial SerialPort(pin_rx, pin_tx); // RX, TX #define pinLed 2 void setup() { SerialPort.begin(9600); pinMode(pinLed, OUTPUT); digitalWrite(pinLed, LOW); } void loop() { if (SerialPort.available()){ switch(SerialPort.read()){ case '1': digitalWrite(pinLed, HIGH); break; case '0': digitalWrite(pinLed, LOW); break; } } }