File Exchange

image thumbnail

App Designer: Instrument Control over Serial (Arduino)

version 3.0 (7.97 MB) by Pavel Roslovets
Control Arduino RGB LED over serial using MATLAB App Designer

47 Downloads

Updated 15 Jul 2019

From GitHub

View Version History

View license on GitHub

This is an example of how you can use App Designer tool to build program to control any hardware over supported protocol (i.e. serial).

HOW TO GET
Execute in MATLAB:
eval(webread('https://git.io/fjP5c'))

INFO
App Designer has visual instrumentation components (knobs, swithes, etc.) so it allows you to build interactive apps for instrument control.
The submission contains a scheme of Arduino based simple device with RGB LED and photoelectric cell. Simulink program for Arduino is provided (requires Arduino Support Package).
With interactive program you can control the RGB LED color and observe illuminance level over the serial connection.
Instrument Control Toolbox is required for optional features.

DOCUMENTATION
https://github.com/ETMC-Exponenta/LEDControlApp

Also there is a describing video (on Rissian, for old version):
https://youtu.be/gixP32MudA4

* Please note that app versions for old releases aren't maintained and are presented just for legacy *

Cite As

Pavel Roslovets (2021). App Designer: Instrument Control over Serial (Arduino) (https://github.com/ETMC-Exponenta/LEDControlApp), GitHub. Retrieved .

Comments and Ratings (11)

abdunur primov

Вы можете более подробное уроки по App Designer

Ali Abootalebiyan

Pavel Roslovets

apple, it depends on your operation system settings. I have a green theme in my Win10.

apple

Thank you Pavel, How to set the background color of the Title 'Instrument Control over Serial' to green?

Pavel Roslovets

Amirala Barjasteh, thank you!
You can see and edit main code in App Designer tool (R2016a and newer). Open 'rgb_control.mlapp' in App Designer (in MATLAB: Right click -> Open) and press 'Code View' button.
FYI: Introduction to App Designer (video)
https://youtu.be/ywqsXpszz8U
Good luck!

Amirala Barjasteh

Thank you Pavel! really interesting!
Is it possible to see the main code of this app? I mean you describe sth about code but I could not find any script in files.

Pavel Roslovets

You can create another Timer that will check if your serial port available and opened.

Check whether port is opened:
s = serial('COM6'); % COM6 for example
s.Status % 'opened' or 'closed'

Returns all available serial ports:
p = instrhwinfo('serial')
p.AvailableSerialPorts

michael

Thank you for shearing!!! do you know how can i change the the program that the LED would change its collier wean Serial is disconnected? and not only by Event?

can i run a loop that will check for communication all the time?

Thanks!!!!

Pavel Roslovets

abd saleh, thank you for your interest. I have updated the discription and added an <App Designer Eng.pdf> file for better understanding

abd saleh

I want to explain more please

MATLAB Release Compatibility
Created with R2019a
Compatible with R2016b and later releases
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Toolbox Extender

Community Treasure Hunt

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

Start Hunting!