Serial input from CircuitPython

2 visualizzazioni (ultimi 30 giorni)
Fabian Leede
Fabian Leede il 2 Dic 2019
Hi All,
A weird combination, I know. But I have a Adafruit ItsyBitsy M4 running on CricuitPython with a connected 9DOF sensor. The Itsybitsy spews out the 9DOF data in a list form on the serial port. I got matlab to read the serial port. But matlab reads it as plain text or random numbers. How can I read it as a list so that I can further use it?
Thanks in advance!
Schermafbeelding 2019-12-02 om 20.18.57.png
clc
clear all
s = serialport("/dev/cu.usbmodem14201",115200);
configureTerminator(s,"CR");
tic
n = 1;
while toc<1 %Loop when Plot is Active
data(:,n) = read(s,6,'double');
datab(n) = readline(s);
n = n+1;
end

Risposte (0)

Categorie

Scopri di più su Performance and Memory 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