TX RX between Arduinos

Good morning, I hope you can help me I believe it is something quite simple.

I'm trying to communicate between two Arduinos, by TX and RX, I'll leave a picture to see how the connections are made, and the code.
The connections I believe are ready. But when I go to the console of "Arduino Wifi Rev 2" it doesn't show anything.

Arduino Nano 33 Ble Sense
CODE

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

void loop() {
  Serial.print("Hi");
  delay(1000);
}

Arduino Uno Wifi 2
CODE

char mystr;

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

void loop() {
  if (Serial.available() > 0){
    mystr = Serial.read();
    Serial.print(mystr);
  }
}

Happy Holidays :slight_smile:

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

It is impossible to see from your photograph exactly how the two boards are connected. Please post a clear schematic of the circuit or a very clear description of what pins on each are connected to each other

1 Like

How do you know from that sketch that it’s not working as it has no visible output .

If you using usb connections to a PC then there is probably a conflict as the USB connection is shared with the Tx/rx pins - certainly on the UNO , you might have to use a different port on the BLE , one is shared with the USB ( can’t recall off hand , I’m watching the TV) .

Suggest you look at serial ports for the BLE and software serial for the UNO and the examples in the IDE

1 Like

Hi :slightly_smiling_face:
I used the code tag.

I made an illustration of the connections

Thank you for your help

hmm ok I think I understand I'll take a look :grin:

Usually serial is transmit (TX) on one end connects to receive (RX) of the other, both ways.

Is that what you have?

If you have both boards running on USB (done that) then those connect to RX and TX and complicate the problem.

1 Like

Are the Rx and Tx pins on the Nano used by Serial or are they actually Serial1 ?

1 Like

yes I have both cards running with usb on the same computer

serial 1? I'm new to Arduino, I can't know much
But if there are tx and rx in arduino nano? yes

From https://docs.arduino.cc/tutorials/nano-33-ble-sense/UART

In some older boards, TX and RX pins are used for communication with the computer, which means connecting anything to these pins can interfere with that communication, including causing failed uploads to the board. This is not the case for the Nano or MKR families, since these ones have two separate channels, using Serial for the communication with the computer and Serial1 for the communication with any other device trough UART.

1 Like

Please note this warning in the Nano 33 BLE Sense documentation:

https://docs.arduino.cc/hardware/nano-33-ble-sense#panel-teach-spec

The microcontroller on the Arduino Nano 33 BLE Sense runs at 3.3V, which means that you must never apply more than 3.3V to its Digital and Analog pins. Care must be taken when connecting sensors and actuators to assure that this limit of 3.3V is never exceeded. Connecting higher voltage signals, like the 5V commonly used with the other Arduino boards, will damage the Arduino Nano 33 BLE Sense.

For this reason, you should not make direct electrical connection between the TX on the Uno WiFi Rev2 and the RX on the Nano 33 BLE. The reason is that the Uno WiFi Rev2 uses 5V logic levels and so this connection can damage your Nano 33 BLE. You should use a logic level converter.

1 Like

Check documentation for what Serial(n) corresponds to TX RX pins

1 Like

OK, the in0 refers that it works at 3.3V and Wifi Rev2 at 5V, I have two Arduino Nano 33 BLE SENSE, I'll try it out there.

Thank you very much, that must be the problem, I have two Arduino Nano 33 BLE SENSE I will test with these same ones.

Thanks for everyone's help, I tried it with two Arduino Nano 33 Ble Sense, and it worked, should the problem really be 5v "Arduino Wifi Rev 2" - 3.3V "Arduino Nano 33 Ble Sense"?


:smiling_face_with_three_hearts:

@in0 @killzone_kid @hammy @UKHeliBob @GoForSmoke

A good learning point for a beginner - thankfully without apparent damage on the 3V3 board.

You were very lucky.
You MUST know what you’re doing BEFORE you do it, this type of error can get expensive in milliseconds.

take care and enjoy the season.

"Serial" on an Uno Wifi 2 is definitely the USB connection back to the PC, and NOT the serial that appears on Pins 0 and 1 (which is Serial1)

You can level 5V to 3.3V with a diode and pullup resistor on a 3.3V pin.
The diode blocks 5V from the 3V input where the pullup makes a HIGH read.
When the same line drops to GND, the pullup is sucked LOW.

SD is one of many 3.3V devices that do need protection from 5V.
74HC4050 hex buffer chips provide 6 5V-to-3V leveler channels. In bulk I paid like 35 cents each chip, 6 cents per channel and cleaner wiring!

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