On C.H.I.P, SPI support is not enabled by default. To communicate with SPI peripherals like LED strips or cheap displays, you need to have the spidev module enabled. This module is now part of the standard kernel so you don't have to compile your own.
To activate SPI, add the module to the device tree then enable it:
sudo mkdir -p /sys/kernel/config/device-tree/overlays/spi sudo sh -c 'cat /lib/firmware/nextthingco/chip/sample-spi.dtbo > /sys/kernel/config/device-tree/overlays/spi/dtbo' sudo modprobe spidev
To make it permanent (load spidev at boot), add the following to
/etc/rc.local as described by danjperron on NTC Board:
mkdir -p /sys/kernel/config/device-tree/overlays/spi cat /lib/firmware/nextthingco/chip/sample-spi.dtbo > /sys/kernel/config/device-tree/overlays/spi/dtbo
If you want to use SPI from userspace (so you can use your Python program without sudo), create the spi group and add your user - chip - to it.
sudo groupadd -f --system spi sudo usermod -a -G spi chip
/etc/udev/rules.d/ directory with the following content:
chip-community has a nice tutorial on how to test that SPI is working. In a nutshell, connect CSIHSYNC (MOSI) to CSIVSYNC (MISO) and run spidev_test:
wget http://www.raspibo.org/renzo/spidev_test.c gcc -o spidev_test spidev_test.c sudo ./spidev_test -D /dev/spidev32766.0