How to read analog data instantaneously from Arduino to MATLAB?
이전 댓글 표시
I have been developing a code where i want to read analog values from ARDUINO to MATLAB instantaneously and i want to create a heat map where the analog values should fill the matrix and display the suitable color for the matrix..I have been trying to develop a 4*4 grid.
The issue i'm facing here is cannot read analog value instantaneously from arduino to matlab instant im getting only one value and in heat map i cannot read values...any suggestions or guidance if i could read analog value and fill the analog value into the matrix which reflects the particular color for the obtained value. Thank you!.
Here is my code which i have developed in MATLAB
% code for analog value read
clc; clear all; close all;
a = arduino;
readVoltage(a,'A0');
% code for heatmap
rand('seed',10000);
A=rand(4,4);
imagesc(A);
axis equal tight.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Setup and Configuration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!