File Exchange

image thumbnail

RaspiRemoteControl

version 1.0.0.3 (78.8 KB) by Ryhor Prakapovich
This package contains files necessary to build Mobile Robot Remote Control based on Raspberry Pi

12 Downloads

Updated 10 Jun 2020

From GitHub

View Version History

View license on GitHub

The app RaspiRemoteControl designed to explore features and capabilities of a Raspberry Pi Hardware. A mobile robot remote control system had been considered as example. The app (running on host computer with MATLAB) allows Raspberry Pi board to communicate with other hardware using GPIO-pins, serial port, I2C and SPI interfaces. For acquiring sensor data and image data had been used MATLAB Support Package for Raspberry Pi Hardware. For creating GUI had been used GUIDE – drag-and-drop environment which the provides various interactive components, including menus, tool bars and axes.
https://www.youtube.com/watch?v=42we9W22iCM

The app menu allows you to perform the following functions:
1. RasPi
• Connect – connect app to Raspberry Pi Hardware via Wi-Fi (usb-dongle); the IP-address may be entered in a special text box “IP address connect” on the main window app; this mode will indicated by green-highlighted button Connect.
• Disconnect – disconnect app from Raspberry Pi Hardware; this mode will indicated by red-highlighted button Connect.
• Network – open the dialogue box to enter IP address, login and password for Raspberry Pi.
• Reboot – reboot the Raspberry Pi operating system.
• Shutdown – shutdown the Raspberry Pi operating system.
• Terminal – open SSH terminal on host computer to use Raspberry Pi onboard Linux shell.
• Close – close the app.

2. Interfaces
• Camera – open the dialogue box to change default settings of Raspberry Pi Camera Board.
• RS232 – open the dialogue box to change default settings of Raspberry Pi Serial Port.
• SPI – open the dialogue box to change default settings of Raspberry Pi SPI interface.
• TWI – is not available in this version.

3. Devices
• Joystick – connect a joystick to the host computer (first joystick on the list).
• Webcam – is not available in this version.

Additional field “Interfaces” on the main window allows user to activate Raspberry Pi interfaces via radio buttons: Camera Board, Serial Port, SPI interface and TWI interface (TWI is not available in this version).
Use Camera Board to obtain images with Raspberry Pi. After the joystick had been connected and radio button “Camera” had been activated, angles of slope first and second axis is being converted into wheel speeds. Then wheel speeds are being sent via serial port in form:
[‘$’, 1, 0, 0, Left Robot Wheel speed, 0, 0, Right Robot Wheel speed, 0, ‘#’].
It is necessary to install MATLAB® firmware (Raspbian) on Raspberry Pi board. Raspberry Pi and host computer must be in same Wi-Fi network. All settings stored in the raspi.mat structure.

Cite As

Ryhor Prakapovich (2021). RaspiRemoteControl (https://github.com/rprakapovich/raspiremotecontrol/releases/tag/v1.0.0.3), GitHub. Retrieved .

Comments and Ratings (6)

Ryhor Prakapovich

It is a possible. But I don't have a free time now.
if you don't want to wait for me :) I can recommend you add in function "update_Cam_Callback" (RaspiRemoteControl.m) simple matlab function "imwrite(snapshot(handles.cam), 'YOUR_PC_PATH_FOLDER_FOR_IMAGE_FRAMES' )". Then based on the received frames you can generate a video by special software or Matlab functions.

Divyesh Rohit

Hi,
Is there any option to record video using this app?
I want to record a video with 90 fps or take continuous snapshots for a specific time period.
I have Raspberry Pi 3 B with camera module.

Ivan Vorobyou

PROJECT SR

Thank you Ryhor.

I want to know how to connect and control motor.
When I saw this project movie , operator controlled robot using joystick.I want to do same thing .
So, please tell me constitution of robot hardware , especially around raspberrypi.

If I have to fix this program for control robot using joystick , please tell me the program.

Ryhor Prakapovich

Unfortunately, I have not tested the application on Raspberri Pi 3B. However, I can advise you to activate the SPI Raspberri interface :
sudo raspi-config
select “9. Advanced Options” afterwards -> “A6 SPI” -> choose “Yes” -> again choose “Yes” on “Would you like the SPI kernel module to be loaded by default?” -> click “Finish” -> “Yes” on “Would you like to reboot?”

MonoxVal Ferrugem

Hello Ryhor,

The application GUI looks great. However, I can't connect to my Raspberry PI 3B. It throws me the following error:

Error using raspi.internal.spidev (line 59)
SPI channel CE0 is not available. Use AvailableSPIChannels property of the raspi object
to see a list of available SPI channels.

Error in raspi/spidev (line 603)
spiObj = raspi.internal.spidev(obj, varargin{:});

Error in RaspiRemoteControl>pushbutton_IPconnect_Callback (line 196)
handles.spi = spidev(handles.mypi,...

Error in RaspiRemoteControl>Menu_Raspi_Connect_Callback (line 641)
pushbutton_IPconnect_Callback(src, evt, handles)

Error while evaluating Menu Callback

I can connect both in Simulink and MATLAB .m to my RPI no problem. But I can't using this file. What should I comment or enable to connect to my RPI?

I don't have any other thing, just RPI and the camera. No joystick.

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!