Not work with serial between the NANOs

Ummm, I have hard time... I might be idiots...

I am trying both the Nanos to communicate via PUTTY software in windows.

Do like PUTTY_A to Nano_1(COM3 USB) to Nano_2(COM4 USB) to PUTTY_B

I set two Nanos V.3:
Pin 1 (TXD1) to Pin 2 (RXD0)
Pin 2 (RXD0) to Pin 1 (TXD1)
Pin 4 (GND) to Pin 4 (GND)

Blank program in it because the Nano has USB to Serial chip built-in.

I opened both two PUTTY (COM3 and COM4), when I type either of both, I see the LEDs is flashing while I type mean should be sending and reading. but nothing happen on the PUTTY.

something I missed?

Without any code loaded on the boards, what are. you expecting them to do ?

I thought it do not need code? because the chip on bottom the Nano board for USB to serial is already run itself? mean ATmega328 is no use? am I wrong?

Yes.

You need some code to transfer the input from one Arduino to its output. That doesn't happen automatically, you need code . You also need code to set the baud rate of the Arduino.

Ummm okay, just like this code?

void setup() {
  Serial.begin(9600);
}

void loop() {
 if (Serial.available()) { 
    Serial.write(Serial.read()); 
  }
}

it's sound like loopback?
And will it do with RXD0 and TXD1 without set port?

I got it worked!!

#include <SoftwareSerial.h>

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

void setup() {
  Serial.begin(9600);
  mySerial.begin(9600);
}

void loop() { 
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}

Thanks!

I suppose what you are trying to do is called "loopback test".
In order for the arduino to not interfere with data, you need to connect RESET pin to GND on both Nanos.
In this case, no code in the arduino is needed
https://support.arduino.cc/hc/en-us/articles/360020366520-How-to-do-a-loopback-test

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