for SPI, use "spidev". You also need to start the driver "sudo modprobe spi_bcm2708".
There are good tutorials at adafruit, demonstrating SPI for python.
The code snipped is just copied and shorted from one of may programs. It just demonstrates the basic usage.
Code: Select all
# -*- coding: utf-8 -*-
-- os.system("modprobe spi_bcm2708")
self.spi = spidev.SpiDev()
self.spi.max_speed_hz = 1000000