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 CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by