1.1 Controlling status of LED from MATLAB GUI and Arduino in 2017

In this project we will control status of an LED by creating a MATLAB GUI having two push buttons. One push button turns LED on and other push button turns it off.

ALL MATLAB GUI TUTORIALS:

1.5.1: Creating GUI :”Interfacing L298N with Arduino using MATLAB GUI” (PART 2)

1.5.0 PROJECT OVERVIEW: Interfacing L298N motor driver with Arduino using Matlab GUI

1.4 Potentiometer’s analog input to control brightness of LED using Arduino and Matlab GUI

1.3 Print Analog input from a potentiometer on Matlab Command Window using Arduino

1.2 Controlling brightness of LED using Matlab GUI and Arduino in 2017

1.1 Controlling status of LED from MATLAB GUI and Arduino in 2017

1.0 Installing Arduino support package & Matlab GUI basics in 2017

Welcome to the second tutorial or tutorial no. 1.1 of the course “using MATLAB GUI with Arduino support package”. Click here to read tutorial no. 1.0, ‘Installing Arduino support package & Matlab GUI basics’ or very first tutorial of the course. 

Watch this quick but detailed video to create your first “MATLAB GUI – Arduino” project.

 

 

1.  First of all create this GUI in Blank GUI and then run it.

 

 

 

 

 

 

 

 

For pushbutton on left side: String name  =  ‘ON’ ; Tag name = ‘ON’

For pushbutton on left side: String name  =  ‘OFF’ ; Tag name = ‘OFF’

 

 

 

2. Now under Opening function type these commands:

 

 

 

 

 

 

 

 

 

 

clear all;

global a;

a= arduino(‘COM3’);

 

 

 

 

 

 

3. Under function ‘ON’ type:

 

 

 

 

 

 

 

 

global a;

writeDigitalPin(a,6,1)

 

 

 

 

3. Under function ‘OFF’ type:

 

 

 

 

 

global a;

writeDigitalPin(a,6,1)

 

 

 

NOTE: This code is explained in detail in the above video ^.

 

 

SETUP:

 

 

 

 

 

                                         Circuit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

NOTE: Watch the above video to see this GUI in action!

1 Comment

One Reply to “1.1 Controlling status of LED from MATLAB GUI and Arduino in 2017”

  1. hello!,I love your writing so much! share we keep up a correspondence more about your article on AOL? I require an expert on this space to resolve my problem. Maybe that’s you! Taking a look forward to peer you.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: