I am attempting to run the SoftwareSerial example on the Arduino Primo. The example code does not work and I am wondering whether the pin assignments are correct. Example code:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
// Serial.println("Goodnight moon!");
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
// mySerial.println("Hello, world?");
}
void loop() // run over and over//
{
if (mySerial.available())
Serial.println("Gotcha");
if (Serial.available())
mySerial.write(Serial.read());
}