Hello, enybody can explain me how the signals from MRL serial to Arduino is coded?
I am trying to decode but have no idea what method is used to code serial messages going to arduino.
Example from serial readings that:

-86
15
32
14
12
9
96
0
46
7
108
46
115
122
121
106
97
is the attach servo to larduino - left arduino pin 12 connected to COM3
that:
-86
3
33
15
12
is enable servo on pin 12.
 
I understand that sending long messages by serial is not effective so best way is make it smaller.
What method is used to code and decode those messages?
 
Is it like MIDI message format?
 
 

GroG

3 years ago

Ahoy bartcam !

The messages are binary, and they are defined by a message schema file.
All messages can be found in this file

https://github.com/MyRobotLab/myrobotlab/blob/develop/src/main/resource…

Here you can see the various messages for a Servo
# - is a comment
> is a message from a computer over the serial line to the Arduino 
< is a message to a computer from the Arduino

All messages start with a magic byte

The application that digests this shema file and generates Java and Arduino C++ code to handle the communication is this Java file - https://github.com/MyRobotLab/myrobotlab/blob/develop/src/main/java/org…

I am writeing program in python to get values from arduino and control arduino from python.
I am still trying to understand how code decode works but still nothing. Can't get how it works . I am a noob in JAVA :(.
I know it must be simple but I am trying to convert messages to logic values and don't have idea how.