Serial input from CircuitPython
2 views (last 30 days)
Show older comments
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!

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
0 Comments
Answers (0)
See Also
Categories
Find more on Performance and Memory in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!