We do a basic intro to using Python on a Raspberry Pi. We start by using the PiStop from the worksheet, but then go to build a touch screen based photo booth.
2. Questions
Has anyone never seen or used a Raspberry Pi?
Does anyone work professionally develop for Pi
or embedded systems/IoT?
Windows or OS X?
Who is from Philadelphia?
Who is from the suburbs/outside the city/NJ?
3. Meetup Rules
This is a beginner friendly meetup, focus on Pi, but
open to including other platforms and hardware
There are no stupid questions.
Open discussion is encouraged, keep it friendly!
If you have equipment you would like to talk about or
test together, see me after the presentation!
Problems become opportunities when the right people
join together! Be the bridge!
5. About Brad
17+ years in IT, tech support, Linux administration
Currently Senior DevOps Engineer for Health Union
Mostly self-taught, with help from mentors and
Philly tech communities. Love just building stuff!
Not great at coding, really enjoy servers and apps!
Coffee & Pi is meant to help people at all ages and
skill levels to learn more about technology
6. What I did on my summer
vacation
May - Participated in the 2nd Philly Art Museum Hackathon
Was a finalist again, 2nd year in a row, didnt win :(
June - Started a new job at Health Union :)
June-August - Tried to build an iPhone travel app
Failed :( (Did learn a lot about React Native and Swift!)
August - Registered Coffee & Pi with the Raspberry Pi Foundation
They have STICKERS!!! And I have news :)
Got some great ideas and materials for future meetups!
Built a Raspberry Pi photo booth and it works! :)
8. Upcoming Coffee & Pi
October 16 - Everything RetroPie!
Install and configure RetroPie
Explore and maybe demo some alternatives
November - Looking for topic ideas, open to suggestions
Will be more consistent with monthly meetups!
March 2018 - Raspberry Pi Big Birthday Weekend
Coffee & Pi is joining several Philly meetup groups and partners
for one big event!
Introducing Philly & Pi
9. Philly & Pi
Organizing to bring Philly meetups and groups together for demos and
talks to inspire people of all levels and ages to learn with Raspberry Pi
Already confirmed meetup groups and partners
Coffee & Pi Meetup
Philly GraphDB MeetUp
Philly IoT MeetUp
DataPhilly Meetup
Raspberry Pi
Neo4j
10. Help Wanted!
Philly & PI - More details to come! Will be looking
for other groups and partners to join!
Raspberry Pi is in talks about streaming feeds
during the weekend too! Anyone have any
equipment or connections that can help?
Will need volunteers if anyone is interested, will
put you first in line for swag and includes a free
Philly & Pi t-shirt! Let Brad know if you are!
25. Enable Wifi
Click the disconnected Wifi
logo in toolbar (red arrows)
Select the target network
Enter network password/key
Verify icon goes to blue wifi
26. Run Updates
Open Terminal
Run the following commands:
sudo apt-get update
sudo apt-get upgrade
27. Find the IP address
Open Terminal
Run the following command:
ifconfig
Check output for wlan0 for wifi
Run exit to close terminal
28. Open Raspberry Pi Conf
Click the drop down menu
Click on Preferences
Click on Raspberry Pi
Configuration
29. Enable VNC Server
Click on Interfaces tab in
Raspberry Pi Configuration
Click Enabled next to VNC
option
Click on OK to save and
enable VNC server
30. Configure VNC Server
After enabling, will have VNC
icon in the toolbar
Clicking on the icon opens the
VNC Server config settings
Also displays the wifi IP
address
Authentication default is local
user pi with password
raspberry
36. Open Thonny
Worksheet says to use Python 3 IDE, but use
Thonny instead! Its now the default app for .py
Click Menu - Programming - Thonny Python IDE
38. Open PiStop Worksheet
Script in Thonny
Code is online at
https://github.com/CoffeeAndPi/PiStopWorksheet
Make changes, press Run Current Script button
(looks like a play button)
To stop, click Interrupt/Reset button
(looks like a stop button)
39. Thats PiStop!
Can use worksheet to get started.
Expand on the ideas of challenging people by
different sequences and creating code to meet
those challenges.
I didnt feel this was a enough for a meetup,
wanted to do something actually useful and
interesting
42. Based on TouchSelfie Photo
Booth
https://makezine.com/projects/raspberry-pi-photo-booth/
43. The Coffee & Pi Way
Need to install updates and python dependencies
Using the latest Raspbian (Stretch) Sept 7, 2017
May be different than original blog, but tested!
Enable and add the camera and touch screen
Setup Google Photos API integration
Git clone repo, update settings, and run!
44. Required Components
Raspberry Pi 3 + Raspbian Desktop OS
Raspberry Pi Camera V2
Raspberry Pi 7 Touchscreen Display
USB battery pack (cordless) or USB cord
Case or 3D printed camera mount
Google Account with Photos API enabled
45. Install Touch Screen
Raspberry Pi 3 mounts onto the back of the
touch screen with 4 screws
Run red and black cables from Pi to touch screen
(other 3 are for Microsoft IoT and adv dev)
55. Rotate touch screen
180 degrees
Open terminal
sudo vi /boot/config.txt (or use fav text editor)
Add lcd_rotate=2 to the bottom of the file
Save and reboot!
56. Test the Camera
Open Terminal
cd Desktop
raspistill -o cam.jpg
Should take picture and save to Desktop as cam.jpg
More raspistill options
https://www.raspberrypi.org/documentation/usage/ca
mera/raspicam/raspistill.md
57. Setup Pi and Dependencies
Open Terminal
Install Updates
sudo apt-get update && sudo apt-get upgrade
Install Python Dependencies
sudo apt-get install python-imaging python-gdata
python-pil.imagetk
Install Google API for Python
sudo pip install --upgrade google-api-python-client
58. Clone the repo to Pi
In Terminal
mkdir git
cd git
git clone
https://github.com/CoffeeAndPi/TouchSelfie
59. Create Google Photos Album
https://photos.google.com/albums
Create an upload album, save one photo into it
72. Rename and Move JSON
Rename the JSON file to OpenSelfie.json
Move to /home/pi/git/TouchSelfie/scripts
73. Run the App
Add Desktop/PhotoBooth.sh to the desktop
Make it executable!
Double click to start the app!
Its a Raspberry Pi photo booth!!!
75. Thank you!
Anything is possible! Keep experimenting!!!
Connect with other local and online communities
for more help and support!
You have my permission to fail! Keep trying!
Please leave ratings and feedback on
meetup.com, it helps others to find and know
how Coffee & Pi goes!
77. Raspberry Pi Resources
Use the #CoffeeAndPi to show off your projects!
We are on PhillyDev.org Slack #RaspberryPi
You can use the Coffee and Pi meetup tools,
email group, online discussion board
Let me know if theres anything I can do to help!