SPI with Arduino to control LEDs

1 visualizzazione (ultimi 30 giorni)
XecutionStyle
XecutionStyle il 11 Ott 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 Commenti
XecutionStyle
XecutionStyle il 14 Ott 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 il 30 Ott 2017
Have you tried using the Simulink support package for Arduino? That might eliminate the I/O issue you could be facing here.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Arduino Hardware 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