I followed the setup on adafruits site here: http://learn.adafruit.com/adafruits-ras ... gpio-setup
i then created my code below an its giving me an error that it cannot find a module named "Image". Very new to linux and python so all help appreciated.
- Code: Select all
#!/usr/bin/env python
import RPi.GPIO as GPIO
import time
import os
import Image
im=Image.open("/home/pi/imagejpg/Home.jpg").convert("RGB")
#adjust for where your switch is connected
buttonPin = 23
GPIO.setmode(GPIO.BCM)
GPIO.setup(buttonPin,GPIO.IN)
while True:
if ( GPIO.input(23) == False ):
im.show()