Serial input from CircuitPython

2 ビュー (過去 30 日間)
Fabian Leede
Fabian Leede 2019 年 12 月 2 日
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

回答 (0 件)

カテゴリ

Help Center および File ExchangePerformance and Memory についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by