MATLAB Answers

Scaling a variable in MATLAB when interfacing with Arduino

1 view (last 30 days)
Darryl on 27 Feb 2014
I am trying to rescale/remap a variable that is reading from an analog input from my Arduino. The values from the analog port are concatenated to a 1-by-1000 preallocated matrix and plotted in real-time using drawnow within a while loop.
At the moment the resolution from the Arduino is 0-1023, and I want it to be between 0-100, like in my original Arduino sketches. Obviously we use the map() function within the Arduino IDE, but what options have I got with the MATLAB environment?


Sign in to comment.

Answers (0)

Sign in to answer this question.