SPI with Arduino to control LEDs

1 Ansicht (letzte 30 Tage)
XecutionStyle
XecutionStyle am 11 Okt. 2017
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 Kommentare
XecutionStyle
XecutionStyle am 14 Okt. 2017
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 am 30 Okt. 2017
Have you tried using the Simulink support package for Arduino? That might eliminate the I/O issue you could be facing here.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Arduino Hardware finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by