Page 1 of 1

spi.py

Posted: Fri Nov 02, 2018 2:17 pm
by balanga
I have two files called spi.py:-

/usr/local/lib/python3.5/dist-packages/pifacecommon/spi.py
/usr/lib/python3/dist-packages/pifacecommon/spi.py

How do I tell which is being used when I enable the SPI kernel module using raspi-config? and how would I go about enabling the other one?

Re: spi.py

Posted: Fri Nov 02, 2018 5:05 pm
by DougieLawson
In all sane cases you'll find that /usr/local/... trumps /usr/...

There is an assumption that python2 & python3 are sane (we know that to be false because of the V2 versus V3 pain).

Re: spi.py

Posted: Tue Nov 06, 2018 1:27 pm
by balanga
To enable SPI I have to run raspi-config then select 5 - Interface Options -> P4 SPI.

What does this actually do? ie which files are actually affected?

Re: spi.py

Posted: Tue Nov 06, 2018 9:27 pm
by balanga
After some rummaging around it appears that setting SPI on consists of uncommenting

#dtparam=spi=on

in

/boot/config.txt

Can anyone confirm?

Presumably a reboot is required to make it effective...

Re: spi.py

Posted: Wed Nov 07, 2018 9:39 am
by DirkS
balanga wrote:
Tue Nov 06, 2018 9:27 pm
After some rummaging around it appears that setting SPI on consists of uncommenting

#dtparam=spi=on

in

/boot/config.txt

Can anyone confirm?

Presumably a reboot is required to make it effective...
Correct