[Tutor] Python GPIO Code Help Needed

Crush crushed26 at gmail.com
Sun Oct 26 14:12:50 CET 2014


Could this work?

/usr/bin/env python

import os
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.IN)
GPIO.setup(24, GPIO.IN)
GPIO.setup(25, GPIO.IN)

pin_list = ['GPIO.input(23)', 'GPIO.input(23)', 'GPIO.input(23)']

for item in pin_list:
   if item == false:
   os.system('mpg321 -g 95 a.mp3')

Bo 


More information about the Tutor mailing list