How do I use RX and TX for arduino nano bbe?

Hello, I am using a Arduino nano BBE, although im not sure how to communicate other boards using them or how to call them in Arduino IDE.

How would you like to communicate? There are multiple options:

  • Serial1 ( TX and RX pin )
  • Serial (virtual COM over USB) to Serial Monitor and Serial Plotter in the IDE
  • BLE
  • SPI and I2C

Do you have some more specific questions?

Is this your first Arduino project?
Did you have a look at the Examples available in the IDE? File -> Examples
When you install a library e.g., ArduinoBLE there will be additional Examples available in the same menu.

Hello, I would like to communicate using TX and RX.

Over which distance?

Be aware that you have to be careful when directly interfacing with 5V boards (like an Uno, Mega, Leonardo) as the Nano BLE is a 3.3V device. You can e.g. directly connect the TX output of the Nano 33 BLE to the RX input of e.g. a 5V board, but you can not directly connect the TX output of a 5V board to the RX input of a Nano 33 BLE; a voltage divider is the usual way to approach this, but there are dedicated level shifters as well.

I dont know what you mean when you said "Over which distance" but I am using a level shifter to communicate with another board. I am more focused on how to use the TX and RX and use them to power servos on another board.

In which case the boards are something like 50 cm apart?

print or write something at one side, read at the other side?

You can't power servos from TX/RX.

I guess you have to be far more specific. Give a description of your project for better help.

Ah my bad for saying that lol, So I have servos on another board which are being powered by batteries and everything. and I am trying to communicate with that board through a level shifter since the board is a pololu and I am using an arduino to run the code. I need to use TX and RX to do this from the arduino since I can program the arduino.

And even though I have everything wired correclty. I am not sure how to call the pins on the other board as I am new to it. so it's more of a thing of "How do I call the variables and call the pins to move?" as I am trying to make a code that will run these servos using the TX pins.

You can write something that will match Robin's Serial Input Basics - updated

In a simple form, you can send <N,valN> (including <' and >`. N is the number of the servo to control and valN the value for that servo. The receiver could than follow example 5 in the above link.

You can also control multiple servos using e.g. <M,valM;N,valN> to send data for two servos. And if you know that you're always will be sending commands for all servos, N and M can be omitted and you only send the values separated by commas.

I recommend you look at the tutorial sterretje linked for you.

The nice thing with Serial is you can learn everything you need with just one Arduino Nano 33 BLE. Use some separate small sketches to try this out. Disconnect your Arduino Nano 33 BLE from the other board controlling the servos and connect TX with RX. This way when you send something from Serial1 you will receive it on Serial1.

Now you can test everything. Printing and receiving data in the Serial Monitor. Next step sending and receiving data to/from another device without another device. That removes issues with the hardware or setting baudrates incorrectly. You can focus on the software.

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