SPI with Arduino to control LEDs

1 回表示 (過去 30 日間)
XecutionStyle
XecutionStyle 2017 年 10 月 11 日
コメント済み: Madhu Govindarajan 2017 年 10 月 30 日
Hello, I'm trying to control these APA102C LED's via SPI through an Arduino Due. You will see the SPI protocol if you scroll down.
a = arduino('COM6', 'DUE', 'Libraries', 'SPI');
LED = spidev(a, 'D11');
and
writeRead(LED, [0 0 0 0 255 0 0 255 0], 'uint8')
yields no results. I'm following this example. Is there anything wrong that you see? I'm on Matlab 2017a.
Thank you
  2 件のコメント
XecutionStyle
XecutionStyle 2017 年 10 月 14 日
I managed to get the SPI protocol working but I've run into a new issue. When trying to control many LED's I get this error: "SPI count for read and write operations have a limit of 144 for a data precision of 'uint8" and as a result can only control up to 28 LEDs. What is this cap and is there a way to increase it? If not, what alternative do I have to control up to 3-400 LED's?
Thanks in advance
Madhu Govindarajan
Madhu Govindarajan 2017 年 10 月 30 日
Have you tried using the Simulink support package for Arduino? That might eliminate the I/O issue you could be facing here.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by