As a part of my PoC project, I'm using single 5050 LED made by Adafruit. I wired it like this (LED - RPi):
- DI (Data Input) - SPI0 MOSI
- CI (Clock Input) - SPI0 SCLK
- GND (Ground) - GND
- VCC (5V) - 5V PWR
SPI is, as far as I'm concerned, is enabled - I've done it using raspi-config
and also added required line in /boot/config.txt
manually (I'm talking bout param=spi=on
)
Output of lsmod | grep spi*
command:
spidev 16384 0
spi_bcm2835 16384 0
And ls -la /dev/spi*
:
crw-rw---- 1 root spi 153, 0 Jul 29 19:17 /dev/spidev0.0
crw-rw---- 1 root spi 153, 1 Jul 29 19:17 /dev/spidev0.1
To try out my setup, I've launched python interpreter and wrote:
import spidev
spi = spidev.SpiDev()
spi.open(0, 1)
resp = spi.xfer([0x00, 0x00, 0x00, 0x00])
resp = spi.xfer([0xFF, 0xFF, 0xFF, 0xFF])
And nothing happened. What's important, I want to achieve my goal using Python. SpiDev module was installed at the time of the trials. For now, I'm only interested in simple blink, after this is reached, I can go further with modulation or frequency settings.