This post is a follow up of the 28th June post i.e MATLAB & ARDUINO interfacing - Part#1, which was about downloading required MATLAB support file for arduino IDE. This post will elaborate about uploading desired program on UNO and preparing MATLAB environment before establishing communication between arduino uno and MATLAB and also a demonstration of simple digitalWrite function by toggling the LED.
The steps involved for completing the communication between MATLAB and Arduino uno are:
1. Open Arduino IDE and open the "pde" named file in examples , then select a file named "adioes" and upload this program on arduino uno. It will take few seconds and blinking of LED on UNO borad will confirm the uploading.
2. Then open the MATLAB environment , make sure that the current folder selected will be the MATLAB support folder for arduino named "ARDUINO IO" and then create a serial connection of MATLAB with arduino uno using command
>> a= arduino( COM X); here X is the number assigned to the port of your PC or laptop.
3. After successful connection with arduino , assign a pin 13 as a output pin using "pinMode" command and after that, write a Boolean 1 or 0 to pin 13 for toggling the LED connected using "digitalWrite"
command.
The final demo looks like the image below:
"MATunio R"
And do watch video related to this post
For any query post a comment on this post or mail us at arduinomatlab@gmail.com.
The steps involved for completing the communication between MATLAB and Arduino uno are:
1. Open Arduino IDE and open the "pde" named file in examples , then select a file named "adioes" and upload this program on arduino uno. It will take few seconds and blinking of LED on UNO borad will confirm the uploading.
2. Then open the MATLAB environment , make sure that the current folder selected will be the MATLAB support folder for arduino named "ARDUINO IO" and then create a serial connection of MATLAB with arduino uno using command
>> a= arduino( COM X); here X is the number assigned to the port of your PC or laptop.
3. After successful connection with arduino , assign a pin 13 as a output pin using "pinMode" command and after that, write a Boolean 1 or 0 to pin 13 for toggling the LED connected using "digitalWrite"
command.
The final demo looks like the image below:
"MATunio R"
And do watch video related to this post
MATLAB&ARDUINO interfacing - digitalWrite(LED)
For any query post a comment on this post or mail us at arduinomatlab@gmail.com.
No comments:
Post a Comment