#include const int ledPin = PA7; // the pin that the LED is attached to const int rx = PA0; const int tx = PA1; SoftwareSerial mySerial(rx, tx); void setup() { // initialize serial communication: mySerial.begin(4800); // initialize the LED pin as an output: pinMode(ledPin, OUTPUT); } void loop() { if (mySerial.available() > 0) { mySerial.read (); digitalWrite (ledPin, HIGH); delay (1000); digitalWrite (ledPin, LOW); mySerial.write(1); } }