MATLAB Answers

EV3 Bluetooth connection with lag

53 views (last 30 days)
Daniel Bergmann
Daniel Bergmann on 3 Dec 2020
Commented: Nakul Khadilkar on 22 Jan 2021
Hello everyone,
I am trying to control my Lego EV3 motors over bluetooth. I had some problems with the connection first but I solved the problem by using the ID instead of the serial port.
But the response time of the motors via bluetooth has an average delay of 15 seconds. With usb it works fine and immediatly. My Laptop uses the bluetooth version 4.096
Essentials of my program:
myev3 = legoev3('bt','001653449ef7');
mymotor = motor(myev3,'A');
mymotor.Speed = 20;
I suspect it needs a specific bluetooth dongle but I am not sure. I would be very happy if I could get a little help.
Thanks in advance

  1 Comment

Nakul Khadilkar
Nakul Khadilkar on 22 Jan 2021
Hi Daniel,
Though bluetooth connection does not require any additional hardware to connect, it is one of the hardest and least reliable connection. We highly discourage using this connection method. If the connection to the EV3 robot is not successful, make sure
  1. The host computer and the EV3 robot are paired. The bluetooth stack on the EV3 robot in most cases is not compatible with the bluetooth stack on the host. Hence in most cases you may not be able to pair your EV3 robot to the host
  2. When using bluetooth connections, make sure that no other EV3 hardware in the surrounding have their bluetooth turned on / are using bluetooth connection. The interference due to other bluetooth connections is observed to cause disconnections and make it unreliable.
  3. When using Simulink, during deployment of the Simulink model to the EV3 hardware, make sure you are not in the device info screen on the EV3 brick. Staying in the device info page will prevent launching of the Simulink generated binary on the EV3 robot.
Hope that helps.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!