18th Apr, 2015, 06:14 PM
Can you help me?
I 've just bought a raspberry with an electronic starter kit for raspberry called Monkmakes.
I installed Xbian on Raspberry, and now I want to try some programs to controll GPIO.
I downloaded a set of programs by their site.
One of this program is
I attempt to launch this code
but there is this message:
Then I followed this guide http://www.raspberrypi-spy.co.uk/2012/05/install-rpi-gpio-python-library/
Method 2 – Manual Installation
but nothing is changed
I don't understand what I must do and I don't know the version of python, and the last version of RPi.GPIO-0.5.11
I 've just bought a raspberry with an electronic starter kit for raspberry called Monkmakes.
I installed Xbian on Raspberry, and now I want to try some programs to controll GPIO.
I downloaded a set of programs by their site.
One of this program is
Code:
import RPi.GPIO as GPIO
import time
# Configure the Pi to use the BCM (Broadcom) pin names, rather than the pin pos$
GPIO.setmode(GPIO.BCM)
red_pin = 18
GPIO.setup(red_pin, GPIO.OUT)
try:
while True:
GPIO.output(red_pin, True) # LED on
time.sleep(0.5) # delay 0.5 seconds
GPIO.output(red_pin, False) # LED off
time.sleep(0.5) # delay 0.5 seconds
finally:
print("Cleaning up")
GPIO.cleanup()
I attempt to launch this code
but there is this message:
Code:
Traceback (most recent call last):
File "01_blink.py", line 5, in <module>
import RPi.GPIO as GPIO
ImportError: No module named RPi.GPIO
Method 2 – Manual Installation
but nothing is changed
I don't understand what I must do and I don't know the version of python, and the last version of RPi.GPIO-0.5.11