Skip to content

Instantly share code, notes, and snippets.

@beckmx
Created January 10, 2016 06:50
Show Gist options
  • Save beckmx/555d5f55432da24ff2cb to your computer and use it in GitHub Desktop.
Save beckmx/555d5f55432da24ff2cb to your computer and use it in GitHub Desktop.
#include <SoftwareSerial.h>
int answer=0;
SoftwareSerial mySerial(10, 11); // RX, TX
void setup()
{
Serial.begin(9600, SERIAL_9N1);
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
mySerial.println("Hello, world?");
}
void loop() // run over and over
{
while(!Serial.available()){
answer = Serial1.read();
mySerial.write(answer);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment