Facebook Twitter Instagram Pinterest YouTube
    Trending
    • Elecrow Meteor IPS Touchscreen with RGB LEDs
    • Pi Pico Pinout Display on the Command Line
    • How to Add a Raspberry Pi Pico Reset Button
    • Pi Pico Onboard LED
    • Pi Pico W Pinout and Power Pins
    • CrowPi L Raspberry Pi Laptop and Learning Platform
    • Pi Pico W Launched
    • Add Kodi to RetroPie Menu
    Facebook Twitter Instagram Pinterest YouTube RSS
    Raspberry Pi SpyRaspberry Pi Spy
    • Home
    • Categories
      • General
      • Hardware
      • Programming
      • Python
      • Software
      • Tutorials & Help
    • BerryClip
      • BerryClip Instructions
      • BerryClip Plus Instructions
      • Videos & Reviews
    • Buy
      • Buy Pi
      • Buy Pi Accessories
      • Buy Books
    • Tools
      • Ultimate Raspberry Pi Alexa Skill
      • Pi Power Estimator App
      • Pi-Lite 14×9 LED Matrix Sprite Editor
      • RPiREF Pin-out Reference App
      • Simple Ohm’s Law Calculator
      • Web Sites & Links
    • Tutorials & Help
        Featured
        November 9, 20200

        Raspberry Pi Temperature Monitoring

        Recent
        December 23, 2022

        How to Add a Raspberry Pi Pico Reset Button

        November 20, 2022

        Pi Pico Onboard LED

        May 6, 2022

        Add Kodi to RetroPie Menu

      1. Contact Us
      2. Site Map
      Raspberry Pi SpyRaspberry Pi Spy
      You are at:Home»Hardware»Pi GPIO Hardware Interfaces Update Feb 2015
      1-wire, i2c and SPI testing

      Pi GPIO Hardware Interfaces Update Feb 2015

      0
      By Matt on February 12, 2015 Hardware

      The Pi has always supported 1-wire, I2C and SPI interfaces via the GPIO header. These allow various devices to be connected to the Pi and controlled via software. In the recent update to Raspbian some major changes were introduced which changed the way these interfaces are enabled.

      The exact details of the change are discussed in the “I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.” forum post over at the official site.

      A number of my tutorials used these interfaces and the changes rendered them out of date. Luckily I still had the breadboards I used to develop most of these so I decided to update my posts while testing against a Pi Model B+ and Pi 2 Model B.

      1-wire, i2c and SPI testing

      DS18B20 Temperature Sensor1-wire Interface

      This interface is useful for connecting DS18B20 temperature sensors. Enabling it requires a minor edit to the “/boot/config.txt” file and two modprobe commands.

      Here are the posts that refer to the 1-wire interface :

      • Raspberry Pi 1- Wire Digital Thermometer Sensor

      MCP23017 IO Expander ExampleI2C Interface

      Enabling I2C requires an edit to the “/boot/config.txt” file (or use raspi-config to do it for you) as well as an edit to the “/etc/modules” file.

      Here are the posts that refer to the I2C interface :

      • Enabling The I2C Interface On The Raspberry Pi
      • How To Use A MCP23017 I2C Port Expander With The Raspberry Pi – Part 1
      • How To Use A MCP23017 I2C Port Expander With The Raspberry Pi – Part 2
      • How To Use A MCP23017 I2C Port Expander With The Raspberry Pi – Part 3

      MCP3008 and Joystick CircuitSPI Interface

      Enabling SPI just requires an edit to the “/boot/config.txt” file (or use raspi-config to do it for you).

      Here are the posts that refer to the SPI interface :

      • Enabling The SPI Interface On The Raspberry Pi
      • Analogue Sensors On The Raspberry Pi Using An MCP3008
      • Using A Joystick On The Raspberry Pi Using An MCP3008

      General GPIO

      I use the excellent RPi.GPIO library for all my other GPIO inputs and outputs. Currently this doesn’t work on the latest Raspbian. In order to fix this while we wait for an updated Raspbian release you can manually update the library to v0.5.10 from the command line using my Install RPi.GPIO Python Library guide.

      wget https://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.5.10.tar.gz
      tar -xvf RPi.GPIO-0.5.10.tar.gz
      cd RPi.GPIO-0.5.10
      sudo python setup.py install
      cd ~
      sudo rm -rf RPi.GPIO-0.*

      This should get your Python scripts back on track.

      Still To Do

      When I get the chance I will be taking a look at the PiFace Control and Display board to check it still works ok :

      • Farnell PiFace Control & Display Raspberry Pi Add-on Board
      Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
      Previous ArticleHow To Autorun A Python Script On Raspberry Pi Boot
      Next Article Pipsta – The Raspberry Pi Printer With Big Ideas

      Related Posts

      Elecrow Meteor IPS Touchscreen with RGB LEDs

      Pi Pico Pinout Display on the Command Line

      How to Add a Raspberry Pi Pico Reset Button

      Leave A Reply Cancel Reply

      This site uses Akismet to reduce spam. Learn how your comment data is processed.

      Recent Posts
      March 13, 2023

      Elecrow Meteor IPS Touchscreen with RGB LEDs

      December 26, 2022

      Pi Pico Pinout Display on the Command Line

      December 23, 2022

      How to Add a Raspberry Pi Pico Reset Button

      November 20, 2022

      Pi Pico Onboard LED

      November 14, 2022

      Pi Pico W Pinout and Power Pins

      Categories
      • 1-wire
      • 3D Printing
      • Add-ons
      • BBC Micro:bit
      • BerryClip
      • Books
      • Camera Module
      • Cases
      • Events
      • General
      • Hardware
      • I2C
      • Infographics
      • Interfaces
      • Minecraft
      • Model A+
      • Model B+
      • News
      • Pi Models
      • Pi Pico
      • Pi Zero
      • Power
      • Programming
      • Python
      • Raspberry Pi OS
      • Raspbian
      • RetroGaming
      • Robotics
      • Sensors
      • Software
      • SPI
      • Tutorials & Help
      Tags
      Arduino audio battery berryclip Birthday bluetooth cambridge camera CamJam DigiMakers display games GPIO I2C interface Kickstarter Kodi LCD LED Linux media Minecraft Model A motionEyeOS PCB photography photos Pi-Lite Pi Pico power python Raspberry Jam Raspberry Pi Bootcamp raspbian Retrogaming retroPie screen SD card security sensor SPI SSH temperature ultrasonic video
      Raspberry PI Related
      • Adafruit Blog
      • Average Maker
      • Official RaspBerry Pi Site
      • Raspberry Pi Pod
      • RasPi.tv
      • RaspTut
      • Stuff About Code
      Tech Resources
      • MattsBits – Pi Resources
      • Microbit Spy
      • Technology Spy
      Archives
      About

      Unofficial site devoted to the Raspberry Pi credit card sized computer offering tutorials, guides, resources,scripts and downloads. We hope to help everyone get the most out of their Pi by providing clear, simple articles on configuring, programming and operating it.

      Popular Posts
      September 19, 2014

      Top 5 Reasons The Raspberry Pi Sucks

      July 27, 2012

      16×2 LCD Module Control Using Python

      October 20, 2013

      Analogue Sensors On The Raspberry Pi Using An MCP3008

      Recent Posts
      March 13, 2023

      Elecrow Meteor IPS Touchscreen with RGB LEDs

      December 26, 2022

      Pi Pico Pinout Display on the Command Line

      December 23, 2022

      How to Add a Raspberry Pi Pico Reset Button

      Facebook Twitter Instagram Pinterest YouTube RSS

      Entries RSS | Comments RSS

      This site is not associated with the official Raspberrypi.org site or the Raspberry Pi Foundation. Raspberry Pi is a trademark of the Raspberry Pi Foundation.

      Copyright © 2022 - All Rights Reserved - Matt Hawkins

      mastodon.social@RPiSpy

      Type above and press Enter to search. Press Esc to cancel.