Serial communication between arduino uno and arduino nano 33 ble sense

Hi, i am currently working on a tinyML project where my Arduino nano 33 ble sense transmit a character over to my Arduino uno after inference. the Uno will then control a Braccio arm according to what the Uno receives.

I tried the serial communication between the uno and nano but the arm does not move.
the connection between the 2 boards are as stated below:

uno's rx pin to nano's tx pin
nano's rx pin to uno's tx pin
uno's 3.3v pin to nano's 3.3v pin
uno's gnd pin to nano's gnd pin

test code for my nano:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);

}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.write("a");
  delay(1000);
}

test code for my uno:

#include <Braccio.h> 
#include <Servo.h>

Servo base;
Servo shoulder;
Servo elbow;
Servo wrist_ver;
Servo wrist_rot;
Servo gripper;

void setup() {
  // put your setup code here, to run once:
  Braccio.begin();
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  if (Serial.available() > 0) {
      if (Serial.read() == 'a') {
         Braccio.ServoMovement(100,   90, 90, 40, 90, 90, 73);
         Braccio.ServoMovement(100,   90, 90, 0, 90, 90, 73);
      }
  }
 
  
  delay(10000);
}

No, don't connect the positive output of 2 power supplies together! Only the GND's are to be connected together.

Are you using a level shifter between +5v UNO and +3.3V Nano?

no. may i know how do i do that?

You definitely need one, as the pins on the 33 BLE is not 5V tolerant.

https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide/all#hookup-examples

A simple resistor divider might also work

EDIT: if there is a one way transmission from a 3v+ device to a 5v+ device , then I think you can directly connect a 3.3v TX pin to a 5v RX pin. However, you definitely need either a voltage divider or a level shifter, if connecting 5V tx pin to a 3.3v RX pin.

Hopefully someone can clarify this for me.

1 Like

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