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
|
|