MATLAB is a programming language used primarily for numerical computations. Use this tag for questions regarding communicating or using MATLAB with Arduino. Also consider using other tags such as [programming].
0
votes
2answers
34 views
Sending values from Matlab to arduino using serial communication
I want to send numeric value from matlab to arduino but code is not working.
Matlab code is as:
doi = 3 ;
arduino=serial('COM5','BaudRate',9600); % create serial communication object
fopen(arduino)...
0
votes
0answers
36 views
Sending information from Simulink to Arduino over Serial
Hope everyone had a great start to the new year! I am writing in this group to seek some help with sending PWM signal to Arudino over serial via Simulink
Problem description :
I am working on a ...
0
votes
0answers
18 views
Running a MATLAB script using an Arduino Uno button press
I have a Matlab script that I would like to run, using press of a button connected to my Arduino Uno R3. May I know how can this be done?
I'm not sure if it matters, but I managed to get the UNO to ...
0
votes
1answer
31 views
MATLAB+Arduino+LCD
I am trying to send some integers to an LCD. But it is not working. I have tried in Proteus. Please help. I have uploaded MATLAB and Arduino code below.
MATLAB code:
clear all
clc
answer=1; % this ...
3
votes
1answer
48 views
clear Arduino as a global variable in Matlab
I'm trying to use Arduino in Matlab. cause I used Arduino in some function I had to define Arduino as a global variable.
clc,clear,close all;
global a
a = arduino();
.
some functions
.
clear a
at ...
2
votes
1answer
54 views
Play music with an buzzer by Matlab
I'm trying to play a tone with a buzzer on Matlab. there are a lot of example of music for Arduino IDE but I can't find any helpful example in Matlab
by the way I've tried this code to play music
clc,...
0
votes
1answer
127 views
Sending data to an Android phone
I'm trying to read 4 sensors and multiplex them in one channel (audio jack or USB input) in an Android phone. I've tried FDM by modulating the channels then using the audio jack, but I didn't get any ...
0
votes
1answer
52 views
Questions on how to connect Arduino to Matlab through the serial port
I have an Arduino board with Intel Edison on it. I have tried to read data in Arduino from MatLab through the serial port. I'm sure the Arduino board is working because when I use the serial monitor ...
1
vote
1answer
55 views
Matlab interfacing with arduino ERROR
I installed the MATLAB support package for arduino in my MATLAB r2013a today.
Now I plugged on my Arduino in my usb port.
And ran the command:
a = arduino()
Error: Undefined function ...
1
vote
0answers
61 views
ArduinoDue - Matlab: SerialUSB.write() sends ASCII?
I'm trying to get some binary data from an Arduino Due to Matlab.
Basically this is the setup:
Due:
byte usbMsg[33]= {0};
// filled with dummy as example
usbMsg[1] = '00000001';// in[3];
usbMsg[2] ...
0
votes
1answer
67 views
Uploading text file to arduino
I am going to be getting pan and tilt data values from matlab and I would like to save them to a text file and open it on Arduino which will then be used to convert those pan and tilt data values into ...
1
vote
0answers
96 views
I want to generate 10khz frequency on arduino uno pin 9 while reading analog pin A0 while running simulation from simulink model [closed]
I want to generate 10khz frequency on arduino uno pin 9 while reading analog pin A0 while running simulation from simulink model.
without programming arduino and without accessing timers and only ...
1
vote
0answers
46 views
initial power output in the digital io pins of an Arduino controller
I am a newbie.. I am integrating Arduino controller with Matlab
I have connected my arduino DUE board in COM7. And I have also connected a DC Motor in one of the digital output pins (D3)
So when I ...
1
vote
0answers
47 views
Matlab Arduino Multi Byte Read
I'm using Matlab to communicate with a custom AD7746 board through an Arduino UNO. The data sheet mentions that
"In continuous conversion mode, the address pointers’ autoincrementer should be used ...
1
vote
1answer
692 views
MatLab connection to Arduino using Bluetooth
I am attempting to send some information from MatLab to an Arduino Uno via Bluetooth with the following
MatLab program:
b=Bluetooth('HC-06',1);
fopen(b);
for i=1:1:15 ...
5
votes
4answers
640 views
Employing C++ code for Arduino
I have Googled quite a lot regarding using a C++ program for uploading to Arduino and related, however I am confused now. Right, my problem is this:
I have written a C++ program which imports RGB ...
1
vote
0answers
118 views
Communication serial port with matlab
I am trying to communicate with a serial port trought matlab. This is my code:
delete (instrfindall)
clear all
close all
clc;
s=serial('COM4');
set(s,'BaudRate',4800);
set(s,'DataBits',8);
set(s, '...
0
votes
2answers
132 views
MATLAB - Read from 2 SPI inputs synchronously
I am using the MATLAB Arduino Support Package to create a setup where I can read force data from a load cell and positional data from an incremental encoder - then plot them on MATLAB. It must be done ...
1
vote
0answers
115 views
Connection between Matlab and Arduino
I'm trying to connect Maltab and Arduino by this code:
arduino=serial('COM7','BaudRate',9600);
fopen(arduino);
But I get this message:
Open failed: Port: COM7 is not available. No ports are ...
-1
votes
2answers
567 views
Matlab and Arduino Serial communication
I'm new to Arduino and am learning how Serial communication works. I am trying to send a value from Matlab to Arduino, but it seems to be partly fruitful. If anyone can explain the difference between ...
-1
votes
1answer
77 views
Matlab too many input arguments using csvread
I have files called t1_25, t1_45, t1_65, t2_25, t2_45 and so on till t5_65.
I wrote this piece of code:
MaxForce =[0,0,0;0,0,0;0,0,0;0,0,0;0,0,0;0,0,0];
MaxForce(1,1) = 25;
MaxForce(1,2) = 45;
...
0
votes
2answers
582 views
Sending serial data to Arduino from Matlab(not using support package)
I am learning Arduino and trying to understand how integers and strings are sent across the serial port.
I tried a small program in arduino which reads a number as a string and tries to blink led 13 ...
-1
votes
3answers
4k views
Plotting a real time graph of sensor data from Arduino on Processing, MatLab or Python
I have an accelerometer connected to my Arduino Due to spit out data on my serial monitor as described in my earlier post. I'm trying to find a sketch I could use to plot a continuous real-time graph ...
1
vote
0answers
274 views
Problem reading HMC5843 - Magnetometer in Simulink
I'm having a SparkFun 9 DoF sensor stick including the following components:
ADLX345 - Accelerometer
ITG3200 Gyroscope
HMC5843 - Magnetometer
Im currently working on a project in which I need to ...
0
votes
1answer
879 views
Problem with deploying matlab simulink mode to Arduino UNO [closed]
I encounter a problem when deploy matlab simulink model to Arduino UNO
Following shows the error
*The call to realtime_make_rtw_hook, during the after_make hook generated the following error:
The ...
0
votes
2answers
1k views
Matlab to Arduino communication
I am doing some computations on Matlab and I need to send those values to an Arduino Leonardo through USB serial connection. I need to send 2 variables which can vary from -400 to +400. I'm saying ...
1
vote
0answers
305 views
Arduino support package in matlab PROBLEM
i have installed the Arduino support package in matlab , and i have all blocks that come with it in my simulink
the problem is that when i try to establish a serial communication i got smth like this ...
1
vote
0answers
694 views
Sending binary data to Matlab via serial
I would like to exchange data via Xbee. I've set up a communication based on strings between the Arduino and a Matlab software.
Unfortunately this kind of communication isn't enough robust and ...
2
votes
4answers
1k views
Communicating between a computer and multiple Arduinos
I am designing a experiment of controlling 6 small wind turbines wirelessly. For each wind turbine, I need to measure power time series (or voltage or current time series) from the generator, and ...
1
vote
2answers
931 views
analogRead function not working in MATLAB
I am new to Arduino and I am trying to control it through MATLAB. I have downloaded the arduino IO package and installed it.I am using MATLAB 2014a.I have a LED and I change its brightness by ...
0
votes
1answer
1k views
Controlling Arduino through MATLAB?
I had a Roboteq motor controller, but it wasn't fast enough. I'm hoping Arduino will be faster.
Supposing that the transfer is fast enough for my purposes, how can I read angular velocity, given that ...
4
votes
3answers
3k views
Binary serial transmission order of data
I'm implementing a filter for my IMU Sensor and thus I want close to real time data visualized on the computer. I use binary serial communication to facilitate the sending part for the arduino (as far ...
0
votes
2answers
814 views
Read Arduino code generated by Simulink
I am trying to do a Hardware-in-the-loop (HIL) system with Arduino and Simulink but the driver of my motor (Pololu VNH5019) works at 20kHz and simulink PWM block only supports 490Hz.
I would like to ...
6
votes
4answers
16k views
How can I communicate from Arduino to MATLAB
I want to use sensors on an Arduino to control values in a MATLAB program. What are my options for communicating?
I've used Processing to receive data sent via the serial cable, and that strategy has ...
5
votes
2answers
3k views
How to pause Arduino for 1 millisecond through MATLAB?
I have been able to connect MATLAB to my Uno with this line of code: a = arduino('COM4'); through this package: Matlab support package for Arduino.
Right now, MATLAB is my main script that will ...