Presentation is loading. Please wait.

Presentation is loading. Please wait.

Raspberry Pi The singing jelly baby 1. Starter task  Name each of the components on the Raspberry Pi.  If you can, tell me what each of them is for.

Similar presentations


Presentation on theme: "Raspberry Pi The singing jelly baby 1. Starter task  Name each of the components on the Raspberry Pi.  If you can, tell me what each of them is for."— Presentation transcript:

1 Raspberry Pi The singing jelly baby 1

2 Starter task  Name each of the components on the Raspberry Pi.  If you can, tell me what each of them is for. 10

3 Command line coding  Type these three commands seperately.  sudo apt-get install mpg321  wget https://github.com/Rob-Bishop/ RaspberryPiRecipes/blob/master/la.mp3  nano SingingJellyBaby.py 11

4 Python coding Import time Import Rpi.GPIO as GPIO Import os GPIO.cleanup() GPIO.setmode(GPIO.BOARD) GPIO.setup(3,GPIO.IN) While True: if GPIO.input(3) == False: os.system(‘mpg321 la.mp3 &’) time.sleep(1) Sudo python SingingJellyBaby.py 4

5 Put your headphones on…  …Now push your jelly baby! 5


Download ppt "Raspberry Pi The singing jelly baby 1. Starter task  Name each of the components on the Raspberry Pi.  If you can, tell me what each of them is for."

Similar presentations


Ads by Google