Skip to main content Skip to local navigation

Grove board connections in MATLAB

I've posted two videos on YouTube about getting your Grove (or other Arduino-compatible board) connected to MATLAB.  You can see the two videos here:

one includes the Grove Beginner Kit and the other is a standard Arduino Uno-compatible board.  Depending on whether you are using the kit from the Bookstore or are using your own board from another source, either video should work to get your started.

Note on the Grove board: if you are having connection issues please refer to

  1. the Mathworks Hardware Help page, and
  2. update the driver software directly from SeeedStudio via it's Grove Board Wiki.

While one way to check the serial port software connection is with the Arduino IDE, as described in the two videos above, another is to use a program like CoolTerm (on Mac) and Realterm (on Windows).  Here's check the serial ports in CoolTerm via teh Options menu:

cool term ports

Checking the USB serial ports via CoolTerm (or RealTerm in Windows)

Two interesting issues:

COM3 problem

COM3 problem

This issue ("avrdude: ser_open() ... COM3") seems to be discussed here.

USB Serial problem

USB Serial Problem

In the second case the board worked with the Arduino IDE but not with MATLAB.

In both cases two suggested solutions may also be

  1. update to the firmware on the board may help...
  2. or updating the driver for the serial port may also help. (CP2102 USB Driver)

You may also need to verify that you are manually setting the port properly in Matlab (or Simulink): https://www.mathworks.com/help/supportpkg/arduino/ug/configure-host-com-port-manually.html

 

Matlab will install the Arduino IDE during the download of the Arduino Support Package. You can check this install (on Windows) like this.

Matlab will install the Arduino IDE during the download of the Arduino Support Package. You can check this install (on Windows) like this.

From Eric P.

 

 


In one case we found that the board could be programmed using the Arduino IDE and that Matlab could initially program the board but would then fail.

 

SI Labs driver for the Grove board won't install.

Matlab initially connects with the board but then cannot complete reprogramming

Matlab initially connects with the board but then cannot complete reprogramming

We suggested to the student to visit this page for advice

and the suggestions boiled down to
  • Change Arduino root folder
  • Or run Matlab as admin
  • Or remove winavr ( of installed)

 


James Andrew Smith is an associate professor in Electrical Engineering and Computer Science Department in York University's Lassonde School.  He lived in Strasbourg, France and taught at the INSA Strasbourg and Hochschule Karlsruhe while on sabbatical in 2018-19 with his wife and kids.