This was one of my first MATLAB® / LEGO® MINDSTORMS® projects: the model of a moving satellite. Three exercises have been developed from this, which I will shortly provide in the member area with solutions.
The first exercise is about communicating with the LEGO MINDSTORMS EV3 brick using the MATLAB LEGO MINDSTORMS EV3 hardware support. After connecting the EV3 brick via USB, Bluetooth or Wifi connection, we display the text ‘Hello, World!’ on the display of the EV3 brick, play a tone with the frequency 800 Hz and duration of 500 ms, and change the color of the status light of the EV3 brick to a flashing orange color.
The second exercise is about controlling the motors by the Lego sonic sensor. The vehicle has two large Lego motors controlled with the MATLAB script. We program the vehicle in such a way that it drives forward with 20% engine power until it is 20 cm away from an obstacle using the output of the sonic sensor. Then a warning tone sounds, before driving backwards with 20% engine power for five seconds.
The last exercise is about acquiring a series of six images overlapping by one third using a simple webcam using the MATLAB webcam support. The idea is to reference, rectify and merge the images using the Image Processing Toolbox, very similar to create mosaics of multiple satellite images.