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].
56 questions
-1
votes
1
answer
76
views
Wolfram Mathematica reads but closes stream feeds from Arduino Serial port after a few data sets
This is a Wolfram Mathematica / Arduino serial feed problem , but I am posting here just in for any suggestions on enhancing the Arduino code or the Mathematica notebook. The original post is here ...
1
vote
1
answer
1k
views
Updating the firmware of Arduino Mega2560
I wanted to connect my Arduino board to MATLAB although it recognized the Arduino board, I kept receiving the error that said:
"Internal error: The initialization of the server code is incorrect.&...
0
votes
3
answers
1k
views
Problem on Sending float number and multiple float numbers
Im having trouble in sending float number and multiple float numbers.
Im currently working on project matlab and arduino mkr1000. The situation is that i want to send float number and multiple float ...
1
vote
0
answers
79
views
Simulink Legacy Code Tool - custom Arduino servo write block problem
I'm trying to create my own servo.write block in Simulink for Arduino DUE deployment (and External Mode). Before you ask why if there is one available inside the Simulink Arduino Support Package, ...
2
votes
0
answers
216
views
Simulink resets arduino
I am working on servo motors control through serial communication protocol, I am sending data from Simulink to arduino and vice versa, The problem I am getting is that once I open Simulink Servo ...
2
votes
2
answers
327
views
How to program an Arduino Uno to collect data using a timer interrupt and analyze that data in matlab?
I working on a project where I want to collect sensor data (from a sensor) and I want to analyze the first 20 data sample (e.g., find the range, trendline e.t.c.). I know how to compile a timer ...
2
votes
1
answer
272
views
The analog read is not giving the correct waveform as that of an oscilloscope
I have code that fetches analog input values from terminals A0, A1 and A2 of an Arduino Mega 2560. When I plot the data, it does not give the desired waveform.
The desired waveform is also measured ...
1
vote
0
answers
261
views
I2C Communication Matlab - FDC1004
I have a ProtoCentral FDC1004 board (datasheet: http://www.ti.com/lit/ds/symlink/fdc1004.pdf) connected to an Arduino. I am then trying to connect to the system via matlab.
I have found the address (...
1
vote
0
answers
56
views
about receiving float on Atmega32 from matlab
I want to receive a float on Atmega32 from matlab. I display the output on an lcd, but i receive 0.000, can any one help me? Please ...
matlab code
s=serial('COM1','BaudRate',9600);
fopen(s)
fwrite(...
1
vote
2
answers
102
views
about receiving float on matlab from ATmega32 Avr
****i am using ATmega32 to send float and want to receive it on matlab,i send 4.85 from ATmega32 but on matlab i receive 4.260233679216239e-31...can any one help me..thanks in advance**
**
//...
-1
votes
1
answer
82
views
Taking data from main 120V 50/60Hz power
How can I take data from my house main power and reconstruct it signal? I used an transformer and an inverter amplifier to low voltage to 5 volts and read it with A0 analog pin, but I got a very ...
1
vote
1
answer
248
views
Variable sets to 32767 - MATLAB Arduino
I am running out of ideas of what may be causing this problem, and I would appreciate some help identifying anything I am overlooking.
Quick Problem Summary
A variable gets set to 32767 quite often ...
1
vote
0
answers
181
views
MKR 1000 not found in ports when MKR IMU Shield is connected
I am trying to connect my MKR IMU Shield to my MKR1000 by placing the IMU shield in the MKR1000. When I do this, however, the Arduino IDE and Simulink are unable to find the port that my Arduino is ...
0
votes
2
answers
4k
views
Serial.availableForWrite versus Serial.flush
Is there a difference between the following two line codes?
while (Serial.availableForWrite <= 0) {}
versus
Serial.flush()
Thanks!
1
vote
1
answer
292
views
Sending sine wave from MATLAB and reading on Arduino Uno [closed]
I am working on timing issues associated with sampling data at high rates and storing it on an SD card (ADC delays, clock drifts and file I/O time). For this experiment, I thought of sending a ...
1
vote
1
answer
137
views
Connecting arduino with MATLAB
I installed Octave support package for Arduino and it is listed in the packages installed when pkg list command is run.But when the command "a= arduino('COM8')";
is run,"error: serial: Error opening ...
-1
votes
1
answer
490
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 ...
1
vote
0
answers
80
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
1
answer
235
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. ...
2
votes
2
answers
4k
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 ...
-1
votes
1
answer
195
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
1
answer
236
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
4
answers
1k
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
0
answers
365
views
Trouble in acquiring NEO6M GPS data through S-Function builder at Matlab simulink using Arduino libraries
I have connected a NEO6M GPS module to an Arduino Mega 2560 and programmed using TinyGPS++ library's "Device Example". I am getting proper data at serial port.
NEO6MGPS to ArduinoMega2560
Vcc ...
1
vote
1
answer
324
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 ...
2
votes
1
answer
1k
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 ...
2
votes
0
answers
266
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....
2
votes
1
answer
448
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 ...
1
vote
0
answers
562
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
2
answers
5k
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)...
-1
votes
2
answers
3k
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 ...
2
votes
1
answer
1k
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 ...
0
votes
1
answer
599
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
1
answer
856
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 ...
4
votes
0
answers
729
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] =...
2
votes
0
answers
83
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 ...
2
votes
0
answers
133
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
1
answer
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
4
answers
4k
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 ...
2
votes
0
answers
410
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, '...
3
votes
2
answers
480
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 ...
2
votes
0
answers
255
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 ...
0
votes
2
answers
2k
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 ...
0
votes
2
answers
2k
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
3
answers
14k
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 ...
2
votes
0
answers
442
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
1
answer
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
2
answers
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 ...
3
votes
0
answers
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
4
answers
3k
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 ...