/* * Sofware Serial test code * This code reads incomming data and sends it back over the Software serial line. * This code is based on the work of Cody Bradly at http://www.ernstc.dk/arduino/tinycom.html * and on the SoftwareSerialExample Tom Igoe * * Date 2019-04-24 * Author Joey van der Bie * */ #include const int RX = 0; const int TX = 1; SoftwareSerial mySerial(RX, TX); void setup() { pinMode(RX, INPUT); pinMode(TX, OUTPUT); mySerial.begin(9600); } void loop() { if ( mySerial.available() ) { //send every received character mySerial.println( mySerial.read() ); delay(10); } else { mySerial.println( "0" ); delay(1000); } }