Python SpiDev TypeError - Raspberry Pi Forums


i have installed spi following steps

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 
i commented out long_description line setup.py , installation completed. when run code example

code: select all

import spidev spi = spidev.spidev() spi.open(0,0) spi.mode = 1
when last line spi.mode = 1 executed im given error

code: select all

typeerror: mode attribute must integer 
any guesses?

kashyapgada wrote:any guesses?
spi not enabled operating system? [ raspi-config, option a6 ]

code not being run root privileges? [ sudo python mytest.py ]


raspberrypi



Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support