uncacsci@uncacsci-pi3-a:~$ sudo apt-get install -y python3 python3-pip python-dev Reading package lists... Done Building dependency tree Reading state information... Done python-dev is already the newest version. python3 is already the newest version. python3-pip is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. uncacsci@uncacsci-pi3-a:~$ sudo apt-get install python3-gpiozero Reading package lists... Done Building dependency tree Reading state information... Done python3-gpiozero is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. uncacsci@uncacsci-pi3-a:~$ id uid=1001(uncacsci) gid=4(adm) groups=4(adm),101(input),997(gpio),998(i2c) uncacsci@uncacsci-pi3-a:~$ python3 Python 3.4.2 (default, Oct 19 2014, 13:31:11) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from gpiozero import Button >>> uncacsci@uncacsci-pi3-a:~$ python3 Python 3.4.2 (default, Oct 19 2014, 13:31:11) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from RPi import GPIO >>> GPIO.setmode(GPIO.BCM) >>> GPIO.setup(9, GPIO.IN, GPIO.PUD_UP) >>> GPIO.input(9) 1 >>> GPIO.input(9) 1 >>> GPIO.input(9) 0 >>> GPIO.setup(11, GPIO.OUT) >>> GPIO.output(11, GPIO.HIGH) >>> GPIO.output(11, GPIO.LOW) >>> exit Use exit() or Ctrl-D (i.e. EOF) to exit >>> exit() uncacsci@uncacsci-pi3-a:~$ cat ledon #! /usr/bin/python3 ledpin=11 from RPi import GPIO GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(11, GPIO.OUT) GPIO.output(11, GPIO.HIGH) uncacsci@uncacsci-pi3-a:~$ cat ledoff #! /usr/bin/python3 ledpin=11 from RPi import GPIO GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(11, GPIO.OUT) GPIO.output(11, GPIO.LOW) uncacsci@uncacsci-pi3-a:~$ chmod a+x ledon uncacsci@uncacsci-pi3-a:~$ chmod a+x ledoff uncacsci@uncacsci-pi3-a:~$ ./ledon uncacsci@uncacsci-pi3-a:~$ ledoff bash: ledoff: command not found uncacsci@uncacsci-pi3-a:~$ ./ledoff uncacsci@uncacsci-pi3-a:~$ cat readbutton #! /usr/bin/python3 buttonpin=11 from RPi import GPIO import json GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(9, GPIO.IN, GPIO.PUD_UP) if GPIO.input(9)==0: state = 'on' else: state = 'off' print(json.dumps({'state':state})) uncacsci@uncacsci-pi3-a:~$ exit exit Process shell finished uncacsci@uncacsci-pi3-a:~$ i2cdetech -y 1 bash: i2cdetech: command not found uncacsci@uncacsci-pi3-a:~$ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- 39 -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- uncacsci@uncacsci-pi3-a:~$ exit exit Process shell finished