Arduino+MATLAB MATuino - MATLAB & ARDUINO Serial Communication
Arduino+MATLAB MATuino - MATLAB & ARDUINO Serial Communication
mais
Prximo blog
Criar um blog
Login
Arduino+MATLAB = MATuino
This blog is basically a platform for sharing knowledge about interfacing of world's first open source
hardware ARDUINO with MATLAB and making variety of projects using ARDUINO+MATLAB or
ARDUINO or MATLAB.
MATuino R
int recValue;
Add to circles
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop()
{
if(Serial.available()>0)
{
27 have me in circles
recValue=Serial.read();
if (recValue == 100)
View all
About Me
MAT uino R
Follow
digitalWrite(ledpin, HIGH);
}
if(recValue == 101)
27
MATuino R is a
youtube tutorial
channel for sharing
knowledge about interfacing of
world's first open source hardware
ARDUINO with MATLAB and
making variety of projects using
ARDUINO+MATLAB or ARDUINO
or MATLAB.
This channel is also associated with a
blog
http://matlabarduinorobotics.
blogspot.in/
View my complete profile
Blog Archive
2015 (1)
2014 (14)
August
(1)
July (8)
Arduino
INDIA
call for
interns
!
MATLAB
GUI for
image
type
http://matlabarduinorobotics.blogspot.in/2014/07/matlab-arduino-serial-communication.html
1/3
26/5/2015
Upload the above program on Arduino UNO and then open MATLAB environment for
establishing serial communication with UNO.
The MATLAB code required for establishing communivcation and sending required command for
toggling LED is:
s=serial('COM','BAUD', 9600); % Make sure the baud rate and COM port is
% same as in Arduino IDE
fopen(s);
for m=1:10
servalue= input('Enter the value 100 to turn ON LED & 101 to turn OFF LED :');
fprintf(s,servalue);
end
New
membe
r in
ARDUI
NO
family:
USB
Host
Shield
MATLAB
&
ARDUI
NO :
LED
blinkin
g
MATLAB
&
ARDUI
NO
interfac
ing digital
Write(L
ED)
June (5)
After opening the MATLAB execute this program, initially a LED on PIN13 on Arduino UNO will
blink that denoted handshaking or serial communication establishment between UNO and
MATLAB . Then MATLAB will ask user to enter desired value, make sure to enter 100 to turn ON
and 101 to turn OFF LED.
Note: Make sure the baud rate and COM port entered in MATLAB code is similar to the one in
Arduino IDE
For any further query commen on this post or post your question on
Google+ account name MATuino R
https://plus.google.com/u/0/106198205604943884729/posts
Facebook community page arduinomatlabrobotics
https://www.facebook.com/arduinomatlabrobotics?ref=hl
http://matlabarduinorobotics.blogspot.in/2014/07/matlab-arduino-serial-communication.html
2/3
26/5/2015
3 comments
Top comments
1 Reply
1 Reply
Newer Post
Home
Older Post
http://matlabarduinorobotics.blogspot.in/2014/07/matlab-arduino-serial-communication.html
3/3