R-PI GPIO with Python
From emboxit
Accessing R-PI GPIO using RPi.GPIO module
- How To Use GPIO Pins On Raspberry Pi – Buttons And LED Tutorial This has the correct pinout picture and input example
- Getting Started with Raspberry Pi GPIO and Python dont use the pinout picture. I installed RPi.GPIO as suggested here
- Below python code creates a 10Hz pulse at line 4
And outputs to line 8 what is input at line 7. <python>
import time import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(4, GPIO.OUT) GPIO.setup(7, GPIO.IN) GPIO.setup(8, GPIO.OUT) for x in range(0,1000): time.sleep(0.1) GPIO.output(4,GPIO.HIGH) time.sleep(0.1) GPIO.output(4,GPIO.LOW) if (GPIO.input(7) == True): GPIO.output( 8, GPIO.HIGH) else: GPIO.output( 8, GPIO.LOW)
</python>
- Operating a Simple Switch and LED on the Raspberry Pi
- RPi.GPIO A module to control Raspberry Pi GPIO channels
- raspberry-gpio-python Python library for GPIO access on a Raspberry Pi
- raspberry-gpio-python How to use inputs in RPi.GPIO
- raspberry-gpio-python The basics of using RPi.GPIO
- Physical computing with Raspberry Pi, Buttons and Switches, Difficulty: beginner
- Getting Started With GPIO On a Raspberry Pi