Python SpiDev TypeError - Raspberry Pi Forums
i have installed spi following steps
i commented out long_description line setup.py , installation completed. when run code example
when last line spi.mode = 1 executed im given error
any guesses?
code: select all
mkdir python-spi cd python-spi wget https://raw.github.com/doceme/py-spidev/master/setup.py wget https://raw.github.com/doceme/py-spidev/master/spidev_module.c sudo python setup.py install
code: select all
import spidev spi = spidev.spidev() spi.open(0,0) spi.mode = 1
code: select all
typeerror: mode attribute must integer
spi not enabled operating system? [ raspi-config, option a6 ]kashyapgada wrote:any guesses?
code not being run root privileges? [ sudo python mytest.py ]
raspberrypi
Comments
Post a Comment