Azzera filtri
Azzera filtri

Scaling a variable in MATLAB when interfacing with Arduino

1 visualizzazione (ultimi 30 giorni)
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?

Risposte (0)

Categorie

Scopri di più su MATLAB Support Package for Arduino Hardware in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by