Serial printing from a software serial comm port

I have the Arduino uno connected to the FTDI Basic

Arduino Uno FTDI Basic 3.3v
RESET ---> 10uf cap----> DTR
2 ------------------------> RX
3 -------------------------> TX
3.3v -------------------------> 3.3v
GND -------------------------> GND

I have the FDTI connected via usb to my mac and the arduino programming port connected via usb to my mac to a seperate usb-c port n the mac.

I want to see the mySerial print logs in the serial monitor. But I can't see them. I only see the regular Serial port logs. I tried switching the port on the Arduino IDE but then I get no logs.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3); // RX, TX


void setup() {
  Serial.begin(9600);
  // Start the USB serial connection with the computer

  // Start the software serial connection
  mySerial.begin(9600);
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.println("<Arduino is ready>");
}

void loop() {
  mySerial.println("the software serial");
  Serial.println("the regular Serial");
  digitalWrite(LED_BUILTIN, HIGH);
  delay(300);
  digitalWrite(LED_BUILTIN, LOW);
  delay(300);
  delay(3000);
}
SoftwareSerial mySerial(0, 1); // RX, TX

Why on Earth are you using pins 0 and 1 for SoftwareSerial ? They are used by the hardware Serial interface

If you want to print what is received on a SoftwareSerial interface then use other pins when you create it. When data is available() on the SS interface, read each byte and print it to Serial as normal

Oh that makes sense. But I moved the connections and updated the code and original post to 2,3 and it still doesn't work.

So you have an Uno on a given serial port.
And you have a FTDI on another serial port.

So you open two instances of the IDE and in each select one of the serial ports. Or use a 3rd party terminal program for the FTDI serial port.

You will not (!!) see both outputs in one terminal.

You may need to swap over the wires on pins 2 & 3 depending on the meaning of RX & TX on the FTDI board.

RX could mean connect to RX on your board, or it could mean this is the RX input where the FTDI board receives data from your board TX pin.

Thanks! I switched it so 2--->TX and 3---->RX and now I can see the different logs in the serial monitor when I switch to the respective ports

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.