Yona-Appletree / ledSPI

An LEDscape-derived server for controlling APA102 LEDs from spidev-enabled linux machines
Apache License 2.0
14 stars 2 forks source link

Intel Edison support? #2

Open Jorgen-VikingGod opened 8 years ago

Jorgen-VikingGod commented 8 years ago

Hi Yona, thx for sharing this awesome source. In the past I was playing a lot with fadecandy and I'm really happy someone was porting this OPC server to the Pi. For my next project, I want to try using this on Intel Edison board. Is there a existing port for Edison, or should I do this by my own?

Jorgen-VikingGod commented 8 years ago

my first try to install ledSPI on edison was not successful :/ Installing git and cloning the ledSPI was easy and without errors. But the "make" command forces first time a reboot of the edison. Second make did not work - so I have to remove all files and clone again. make on second try get some warnings - perhaps errors (could not see all the content)

root@SmartLightPanel:~/ledSPI# ./run-ledspi 
modprobe: FATAL: Module uio_pruss not found.
[main] Starting server on ports (tcp=7890, udp=7890) for 1080 pixels on 1 strips
[udp] Starting UDP server on port 7890
[render] Starting render thread for 1080 total pixels
[render] Awaiting server initialization...
[e131] Starting UDP server on port 5568
[main] Demo Mode Enabled
Allocating buffers for 1080 pixels (25920 bytes)
[main] Initializing / Updating server...[tcp] Starting TCP server on 7890
frame_size1=1080
Starting demo data thread
can't set spi mode: Bad file descriptor
[main] Connecting SPI..../run-ledspi: line 10:   493 Aborted                 ./ledspi-server -c 1080 -S 10500000
Yona-Appletree commented 8 years ago

Interesting, the modprobe error is fine -- that's just coming from the script which was made originally for the BeagleBoneBlack. The most likely issue is that your SPI isn't setup correctly, or the path given to ledspi isn't correct. Have you verified that SPI works, and determined what the device path is? If you have, try running ledspi directly, with a command like this: ./ledspi-server -c 256 --spi-dev /dev/spidev5.1.

Once that works, you'll have to figure out the hardware side. I'm not familiar with the Edison hardware, so you'll have to figure out how to wire into the SPI. It's also possible that the port is being used with another device on another clock select line, which would mean you'd need some logic to only output to your LEDs when the proper clock select line was enabled.

Best of luck, and I'd love to see the results.