How to program ROBOTIS ENGINEER from Matlab

I am using microPython. Here, with the function ‘console(BLE)’ I can sent plain ASCII strings into the serial port using the print() function.
print('Hello World')
sends the string into the serial port and I can read that string from matlab using:

device = serialport("COM4",57600)
configureTerminator(device,"CR/LF",'CR')
reading = readline(device)

This way I can send any information that I want information to Matlab through the serial port.

On the other hand, for writing we noted that the function input() allows to read information from the serial port. Using this, I can send target positions to the motors:

arrived = input()
q = int(arrived)
dxl[i].goal_position(q)

This is how we got bidirectional communication from matlab and the robot using the USB Bluetooth dongle. The lost of some packages distorts some messages so I’m figuring how to guarantee the information flow but it seems promising.

1 Like