UART Connection with Arduino
1366 1 2023-7-4
Uploading and Loding Picture ...(0/1)
o(^-^)o
Peter301
lvl.1

Germany
Offline

Hallo,

i am trying to get a UART connection betweeen my arduino and my Robomaster EP Core. I followed the Instructions (https://robomaster-dev.readthedocs.io/en/latest/text_sdk/connection.html#uart-conn) and this worked, but for that the Arduino is still Connected with my Computer. There is one Examlple (https://github.com/dji-sdk/RoboMaster-SDK/blob/master/examples/02_chassis/10_serial.py), but this Methode is not working. I testet different Baud rates and checked my cables multiple times, but that is not the issue. The following is my Arduino code, when a H is send the attached LED will set to high.
const int ledPin = 13;
int incomingByte;     

void setup() {
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT);
}
void loop() {
  if (Serial.available() > 0) {
    incomingByte = Serial.read();
    if (incomingByte == 'H') {
      digitalWrite(ledPin, HIGH);
    }
    if (incomingByte == 'L') {
      digitalWrite(ledPin, LOW);
    }
  }
}


Thanks already for your anwsers!
Simon
2023-7-4
Use props
DJI Gamora
Administrator

Offline

Hi, Simon. Thank you for reaching out. For this concern, please contact our dev team via email at dev@dji.com for further consultation. Thank you for your kind understanding and support.
2023-7-5
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules