Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [matlab]

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
1answer
44 views

Sending double data from Matlab to the Teensy 3.6 via the microUSB

I've been hitting against a wall for over a week now. My current project is to use a Teensy 3.6 to send data over an SPI bus to a chip which is effective going to be a signal generator. I've made a ...
0
votes
0answers
22 views

How to use virtual connection between matlab simulik and arduino in isis proteus?

I don't know how to connect between matlab simulik and arduino card in isis proteus by using a virtual ports
0
votes
1answer
73 views

What am I missing? Send data from Matlab to Arduino to Micro SD

First off. This is not in any way a class assignment. This is my own personal work and research. I just want to get that out of the way. I am learning how to use Matlab with various Arduino projects. ...
1
vote
0answers
1k views

Interfacing MPU6050 with Arduino through Simulink S-function

I am interfacing MPU6050 with Arduino using Simulink S-function builder. I'm implementing MPU6050_DMP6 code in Simulink s-function builder by following this video. By following this tutorial I ...
0
votes
1answer
102 views

External ADC reference when using MATLAB support package for Arduino

I am using the MATLAB support package for Arduino. However, I need to configure the ADC reference to external. MATLAB documentation doesn't really explain how to do this? Is there any way I can use ...
1
vote
1answer
132 views

Arduino and MatLab with OWI Robotic Arm Edge — Issue with I2C

I'm working on a project where I want to be able to program a robotic arm in Arduino using MatLab. I've used the Arduino Uno with an Adafruit Motor Shield V2.3 and the OWI Robotic Arm Edge kit. The ...
3
votes
4answers
396 views

GUI interface with microcontroller to control a device through SPI

I am trying to develop a GUI to control a device hooked up on the Arduino. The Arduino communicates with the device through SPI. I have developed a GUI on MATLAB to visualize read by the Arduino. For ...
1
vote
0answers
181 views

Trouble in acquiring NEO6M GPS data through S-Function builder at Matlab simulink using Arduino libraries

I have connected NEO6M GPS module to Arduino Mega 2560 and programmed using TinyGPS++ library's "Device Example" and i getting proper data at serial port. NEO6MGPS to ArduinoMega2560 Vcc 3....
1
vote
1answer
158 views

Sidestep one second log rate with NeoGPS when another sensor on the board need to log faster

The sample rate of an accelerometer, like an MPU6050, is much faster than the GPS log rate, different technology, different issues. A common GPS Reciver has, approximatly, one second log rate. In my ...
3
votes
1answer
562 views

Arduino Mega 2650 + Matlab/Simulink - Serial decimation

I am performing a control analysis on an Arduino board. As such, I want to minimize the board cycle duration. (Faster board = faster controller). Introduction: I use Mathworks Matlab/Simulink to ...
1
vote
0answers
215 views

MATLAB and Arduino communication

I have to send from MATLAB to Arduino a char line 'S' to start the arduino program and send back values from a sensor. This is my MATLAB code clear; delete(instrfind); s = serial('/dev/cu....
3
votes
1answer
294 views

Linking Arduino and Matlab

My project is based on controlling a moving fan using different hand gestures. I am using image processing toolbox from matlab to detect and identify various hand movements.I want to link my matlab ...
0
votes
0answers
378 views

Problem sending array data from matlab to arduino

I've two LEDs connected to the arduino uno's pin 12 and 13. I want to control the LEDs independently from the MATLAB serial command. Here is my MATLAB serial command from where I'm sending char array ...
0
votes
2answers
3k 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
2answers
1k 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
618 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 ...
-1
votes
1answer
411 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
439 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
384 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] ...
1
vote
0answers
459 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
63 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
96 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
3k 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
2k 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
363 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, '...
2
votes
2answers
339 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
192 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
1k 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
221 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
1k 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
vote
3answers
11k 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
372 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
2k 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
2k 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
504 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
1k 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 ...
3
votes
4answers
2k 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
2k 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 ...
2
votes
1answer
2k 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 ...
5
votes
3answers
6k 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
1k 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
21k 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 ...
6
votes
2answers
5k 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 ...