boelle
Posts: 225
Joined: Wed May 01, 2013 11:52 am

cant figure gpio load spi

Wed Mar 14, 2018 11:28 am

hi

so i'm following this guide https://www.stuff.tv/features/how-build ... thermostat
sudo raspi-config

Select Interfacing Options, then enable both SPI and i2C

Select finish to reboot. Once it's restarted, test installation with:

gpio load spi

gpio load i2c
and i just cant figure it out... it says to enable spi and i2c in raspi-config as root and so i do... but it still get
gpio: Unable to load/unload modules as this Pi has the device tree enabled.
You need to run the raspi-config program (as root) and select the
modules (SPI or I2C) that you wish to load/unload there and reboot.
checking /boot/config.txt i get :
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
dtoverlay=w1-gpio
tells me that i2c and spi is enabled, so maybe the commands to check it are not the same anymore??

boelle
Posts: 225
Joined: Wed May 01, 2013 11:52 am

Re: cant figure gpio load spi

Wed Mar 14, 2018 11:40 am

found some partly answers here:

viewtopic.php?f=91&t=136867
You don't need the 'gpio load' if you use raspi-config (or any other method) to enable i2c'.
If you're following a tutorial just leave out that step.
but how do i check that they are loaded? i assume that was the guides purpose with the commands

would a simple: ls /dev/*spi* and ls /dev/*i2c* do the trick?

User avatar
MattHawkinsUK
Posts: 538
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
Contact: Website

Re: cant figure gpio load spi

Wed Mar 14, 2018 12:27 pm

Unfortunately those sort of sites don't bother to update tutorials when things change. That article was written in 2015 and I bet they haven't made any changes to it.

Try a Pi dedicated site rather than a pile-em-high-and-forget-tech-site :

Enable I2C on the Raspberry Pi
Enable SPI on the Raspberry Pi
Change the I2C bus speed on the Raspberry Pi
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)

boelle
Posts: 225
Joined: Wed May 01, 2013 11:52 am

Re: cant figure gpio load spi

Wed Mar 14, 2018 12:30 pm

well the guide is good, and i posted another Q after the initial post that you might have missed

Return to “General discussion”