SlideShare a Scribd company logo
Build the internet of things with Raspberry Pi!
The recipe
Hardware Stack

• Raspberry Pi Model B (512 MB Ram)
• Raspberry Pi Camera Module (2 MP) or
any compatible USB Cam *
• Ethernet Cable
• Wifi dongle: Edimax EW-7811Un 150Mbps Wireless
• SD Card ( 4 GB ++)
The recipe
Software Stack

•
•
•
•
•
•

Raspbian OS
Node.js (v 0.10.2 +)
Python (V 2.7)
Shell Scripts
Twitter Stream API
Google Drive API
Downloading weapons
Node.js on Raspberry Pi: https://github.com/DonaldDerek/rPi-cheat-sheet
WARNING
coding mask on!
Connecting to your raspberry pi
ssh-ing

#Avahi Deamon should be installed
ssh pi@raspberrypi.local
#Static IP
shh pi@192.168.5.10

Usefull Links:
http://elinux.org/RPi_Advanced_Setup
* Testing USB Cam
Resurrecting ancient technologies

#Test USB Camera
Lsusb

#Take images from RaspberryPi USB Camera
fswebcam -d /dev/video0 -r 640x480 test.jpeg
Testing Rpi 2mp cam
Tiny yet amazing camera!

raspistill –o test.jpg -w 640 -h 480
WARNING
coding mask on!
App architecture
Where all your scripts belong

• node_modules/
• ntwitter/
• Request/
• bin/
• atom/
• gdata/
• gdrive.py
• images/
• App.js
• Config.js
• Controller.js
• Package.json
• tw-upload.js
Twitter stream api
The communication layer is built upon Twitter’s infrastructure
var twit = new twitter(config);

// Check Credentials
twit.verifyCredentials(function (err, data) {
if(err) console.log(err);
})
.stream('user', {track:watch}, function(stream) {
console.log("Twitter stream is ready and waiting for inc
tweets...")
stream.on('data', function (data) {
//Check if tweet is not empty
if (data.text !== undefined) {
//Action Code here
}

});
//Catch errors
stream.on('error', function (err, code) {
console.log("err: "+err+" "+code)
});
Child process
Control anything you can do in the terminal

child = exec("raspistill -o "+ image_path +" -w 640 -h 480",
function (err, stdout, stderr) {
//trigger another event
})
WARNING
coding mask on!
Google drive api
Light-weight python script
//Authenticate with Gdrive API
try:
docsclient.ClientLogin(username, password, docsclient.source);
except (gdata.client.BadAuthentication, gdata.client.Error), e:
sys.exit('Unknown Error: ' + str(e))
except:
sys.exit('Login Error, perhaps incorrect username/password')
print 'success!'

Resources: http://planzero.org/blog/2012/04/13/uploading_any_file_to_google_docs_with_python
WARNING
coding mask on!
May The Source be With you
https://github.com/DonaldDerek/GoogleBeam

DonaldDerek

DerekHaddad

rhamzeh

r_hamzeh
Ad

Recommended

DigiPinguïns: demo Raspberry Pi (Koen De Smet)
DigiPinguïns: demo Raspberry Pi (Koen De Smet)
Avansa Mid- en Zuidwest
 
Windows 10 IoT Core for Raspberry Pi 2
Windows 10 IoT Core for Raspberry Pi 2
Stavros Kalapothas
 
Server Festa 2013 Autumn
Server Festa 2013 Autumn
Michael H. Oshita
 
Asterisk sip channel performance
Asterisk sip channel performance
Flavio Eduardo de Andrade Goncalves
 
introduction to Raspberry pi
introduction to Raspberry pi
luckyanks1992
 
Introduction to raspberry pi
Introduction to raspberry pi
동호 손
 
Polstra 44con2012
Polstra 44con2012
Philip Polstra
 
Raspberry pi : how to get started
Raspberry pi : how to get started
동호 손
 
Brewing ALE with Pi
Brewing ALE with Pi
Kristian Kristensen
 
What & How to Customize Android?
What & How to Customize Android?
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
Raspberry Pi Using Python
Raspberry Pi Using Python
Seggy Segaran
 
Raspberry Pi 3 + UART/Bluetooth issues
Raspberry Pi 3 + UART/Bluetooth issues
yeokm1
 
Raspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 update
Kevin Hooke
 
SPDK benchmark memo
SPDK benchmark memo
Naoto MATSUMOTO
 
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Cheng-Yi Yu
 
Taking the BeagleBone Cookbook recipes beyond BeagleBone Black
Taking the BeagleBone Cookbook recipes beyond BeagleBone Black
Drew Fustini
 
State of the Art Telephony with Ruby
State of the Art Telephony with Ruby
Adhearsion Foundation
 
Pharo VM Performance
Pharo VM Performance
Pharo
 
Raspberry pi
Raspberry pi
Vigyat Tripathi
 
Update from-build-workgroup
Update from-build-workgroup
Michael Dawson
 
DCSF 19 eBPF Superpowers
DCSF 19 eBPF Superpowers
Docker, Inc.
 
PiFlash: Linux utility to flash SD cards for Raspberry Pi computers
PiFlash: Linux utility to flash SD cards for Raspberry Pi computers
Ian Kluft
 
The 12 tasks of Asterisk
The 12 tasks of Asterisk
Elio Rojano
 
Network Automation with Ansible
Network Automation with Ansible
Anas
 
Beagle board
Beagle board
Kondaveeti Arun Gopal
 
Riot Games Scalable Data Warehouse Lecture at UCSB / UCLA
Riot Games Scalable Data Warehouse Lecture at UCSB / UCLA
sean_seannery
 
Олександр Лінивий — Multisite platform with continuous delivery process for m...
Олександр Лінивий — Multisite platform with continuous delivery process for m...
LEDC 2016
 
Raspberry pi
Raspberry pi
Ali Asger Modi
 
Read Twitter Stream and Tweet back pictures with Raspberry Pi & AWS Lambda
Read Twitter Stream and Tweet back pictures with Raspberry Pi & AWS Lambda
Corley S.r.l.
 
Coffee & Pi - Getting Started with Python
Coffee & Pi - Getting Started with Python
Brad ☼ Derstine
 

More Related Content

What's hot (20)

Brewing ALE with Pi
Brewing ALE with Pi
Kristian Kristensen
 
What & How to Customize Android?
What & How to Customize Android?
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
Raspberry Pi Using Python
Raspberry Pi Using Python
Seggy Segaran
 
Raspberry Pi 3 + UART/Bluetooth issues
Raspberry Pi 3 + UART/Bluetooth issues
yeokm1
 
Raspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 update
Kevin Hooke
 
SPDK benchmark memo
SPDK benchmark memo
Naoto MATSUMOTO
 
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Cheng-Yi Yu
 
Taking the BeagleBone Cookbook recipes beyond BeagleBone Black
Taking the BeagleBone Cookbook recipes beyond BeagleBone Black
Drew Fustini
 
State of the Art Telephony with Ruby
State of the Art Telephony with Ruby
Adhearsion Foundation
 
Pharo VM Performance
Pharo VM Performance
Pharo
 
Raspberry pi
Raspberry pi
Vigyat Tripathi
 
Update from-build-workgroup
Update from-build-workgroup
Michael Dawson
 
DCSF 19 eBPF Superpowers
DCSF 19 eBPF Superpowers
Docker, Inc.
 
PiFlash: Linux utility to flash SD cards for Raspberry Pi computers
PiFlash: Linux utility to flash SD cards for Raspberry Pi computers
Ian Kluft
 
The 12 tasks of Asterisk
The 12 tasks of Asterisk
Elio Rojano
 
Network Automation with Ansible
Network Automation with Ansible
Anas
 
Beagle board
Beagle board
Kondaveeti Arun Gopal
 
Riot Games Scalable Data Warehouse Lecture at UCSB / UCLA
Riot Games Scalable Data Warehouse Lecture at UCSB / UCLA
sean_seannery
 
Олександр Лінивий — Multisite platform with continuous delivery process for m...
Олександр Лінивий — Multisite platform with continuous delivery process for m...
LEDC 2016
 
Raspberry pi
Raspberry pi
Ali Asger Modi
 
Raspberry Pi Using Python
Raspberry Pi Using Python
Seggy Segaran
 
Raspberry Pi 3 + UART/Bluetooth issues
Raspberry Pi 3 + UART/Bluetooth issues
yeokm1
 
Raspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 update
Kevin Hooke
 
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Cheng-Yi Yu
 
Taking the BeagleBone Cookbook recipes beyond BeagleBone Black
Taking the BeagleBone Cookbook recipes beyond BeagleBone Black
Drew Fustini
 
State of the Art Telephony with Ruby
State of the Art Telephony with Ruby
Adhearsion Foundation
 
Pharo VM Performance
Pharo VM Performance
Pharo
 
Update from-build-workgroup
Update from-build-workgroup
Michael Dawson
 
DCSF 19 eBPF Superpowers
DCSF 19 eBPF Superpowers
Docker, Inc.
 
PiFlash: Linux utility to flash SD cards for Raspberry Pi computers
PiFlash: Linux utility to flash SD cards for Raspberry Pi computers
Ian Kluft
 
The 12 tasks of Asterisk
The 12 tasks of Asterisk
Elio Rojano
 
Network Automation with Ansible
Network Automation with Ansible
Anas
 
Riot Games Scalable Data Warehouse Lecture at UCSB / UCLA
Riot Games Scalable Data Warehouse Lecture at UCSB / UCLA
sean_seannery
 
Олександр Лінивий — Multisite platform with continuous delivery process for m...
Олександр Лінивий — Multisite platform with continuous delivery process for m...
LEDC 2016
 

Similar to Build the internet of things with Raspberry Pi! (20)

Read Twitter Stream and Tweet back pictures with Raspberry Pi & AWS Lambda
Read Twitter Stream and Tweet back pictures with Raspberry Pi & AWS Lambda
Corley S.r.l.
 
Coffee & Pi - Getting Started with Python
Coffee & Pi - Getting Started with Python
Brad ☼ Derstine
 
Smart Wireless Surveillance Monitoring using RASPBERRY PI
Smart Wireless Surveillance Monitoring using RASPBERRY PI
Krishna Kumar
 
New Microsoft PowerPoint Presentation (2).pptx
New Microsoft PowerPoint Presentation (2).pptx
MannuMatamAkash
 
Picamera, Flask and the Twitter API Raspberry Pi workshop
Picamera, Flask and the Twitter API Raspberry Pi workshop
bennuttall
 
Raspberry JAM 1 - Setup Raspberry Pi with Raspbian -Vick Nesh
Raspberry JAM 1 - Setup Raspberry Pi with Raspbian -Vick Nesh
TE4P
 
Remote Video Monitoring System Using Raspberry Pi 3 and GPRS Module
Remote Video Monitoring System Using Raspberry Pi 3 and GPRS Module
rahulmonikasharma
 
Develop Smart Solutions with Raspberry Pi and EnableX Live Video API
Develop Smart Solutions with Raspberry Pi and EnableX Live Video API
Enablex io
 
Wireless security camera
Wireless security camera
Aasheesh Tandon
 
Coffee & Pi - Intro to Pi Workshop
Coffee & Pi - Intro to Pi Workshop
Brad ☼ Derstine
 
The internet of (lego) trains
The internet of (lego) trains
Grzegorz Duda
 
Low Cost HD Surveillance Camera using Raspberry PI
Low Cost HD Surveillance Camera using Raspberry PI
Varun A M
 
Coffee & Pi - intro to Pi Workshop
Coffee & Pi - intro to Pi Workshop
Brad ☼ Derstine
 
05-Pi-Camera.pdf
05-Pi-Camera.pdf
bhaveshagrawal35
 
Selfie booth ppt
Selfie booth ppt
Nandu Bangari
 
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
WiseNaeem
 
projectppt-141127001908-conversion-gate02.pptx
projectppt-141127001908-conversion-gate02.pptx
bhaveshagrawal35
 
05-Pi-Camera.pptx
05-Pi-Camera.pptx
bhaveshagrawal35
 
Hands on Raspberry Pi - Creative Technologists
Hands on Raspberry Pi - Creative Technologists
bennuttall
 
IoT Implementation of Sensor Data Acquisition in Surveillance Applications - ...
IoT Implementation of Sensor Data Acquisition in Surveillance Applications - ...
Arun Joseph
 
Read Twitter Stream and Tweet back pictures with Raspberry Pi & AWS Lambda
Read Twitter Stream and Tweet back pictures with Raspberry Pi & AWS Lambda
Corley S.r.l.
 
Coffee & Pi - Getting Started with Python
Coffee & Pi - Getting Started with Python
Brad ☼ Derstine
 
Smart Wireless Surveillance Monitoring using RASPBERRY PI
Smart Wireless Surveillance Monitoring using RASPBERRY PI
Krishna Kumar
 
New Microsoft PowerPoint Presentation (2).pptx
New Microsoft PowerPoint Presentation (2).pptx
MannuMatamAkash
 
Picamera, Flask and the Twitter API Raspberry Pi workshop
Picamera, Flask and the Twitter API Raspberry Pi workshop
bennuttall
 
Raspberry JAM 1 - Setup Raspberry Pi with Raspbian -Vick Nesh
Raspberry JAM 1 - Setup Raspberry Pi with Raspbian -Vick Nesh
TE4P
 
Remote Video Monitoring System Using Raspberry Pi 3 and GPRS Module
Remote Video Monitoring System Using Raspberry Pi 3 and GPRS Module
rahulmonikasharma
 
Develop Smart Solutions with Raspberry Pi and EnableX Live Video API
Develop Smart Solutions with Raspberry Pi and EnableX Live Video API
Enablex io
 
Wireless security camera
Wireless security camera
Aasheesh Tandon
 
Coffee & Pi - Intro to Pi Workshop
Coffee & Pi - Intro to Pi Workshop
Brad ☼ Derstine
 
The internet of (lego) trains
The internet of (lego) trains
Grzegorz Duda
 
Low Cost HD Surveillance Camera using Raspberry PI
Low Cost HD Surveillance Camera using Raspberry PI
Varun A M
 
Coffee & Pi - intro to Pi Workshop
Coffee & Pi - intro to Pi Workshop
Brad ☼ Derstine
 
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
Advanced View of Projects Raspberry Pi List - Raspberry PI Projects.pdf
WiseNaeem
 
projectppt-141127001908-conversion-gate02.pptx
projectppt-141127001908-conversion-gate02.pptx
bhaveshagrawal35
 
Hands on Raspberry Pi - Creative Technologists
Hands on Raspberry Pi - Creative Technologists
bennuttall
 
IoT Implementation of Sensor Data Acquisition in Surveillance Applications - ...
IoT Implementation of Sensor Data Acquisition in Surveillance Applications - ...
Arun Joseph
 
Ad

More from Donald Derek Haddad (6)

Getting Started with Google Cloud Technology
Getting Started with Google Cloud Technology
Donald Derek Haddad
 
Js revolution donald_derek
Js revolution donald_derek
Donald Derek Haddad
 
Build your own RasPiTV with Node.js & Socket.io
Build your own RasPiTV with Node.js & Socket.io
Donald Derek Haddad
 
The Dark Side of the Pi
The Dark Side of the Pi
Donald Derek Haddad
 
Google IO Extended - Build Your Own Google TV
Google IO Extended - Build Your Own Google TV
Donald Derek Haddad
 
The Javascript Revolution
The Javascript Revolution
Donald Derek Haddad
 
Getting Started with Google Cloud Technology
Getting Started with Google Cloud Technology
Donald Derek Haddad
 
Build your own RasPiTV with Node.js & Socket.io
Build your own RasPiTV with Node.js & Socket.io
Donald Derek Haddad
 
Google IO Extended - Build Your Own Google TV
Google IO Extended - Build Your Own Google TV
Donald Derek Haddad
 
Ad

Recently uploaded (20)

Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
 
UserCon Belgium: Honey, VMware increased my bill
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
 
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
Safe Software
 
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
Curietech AI in action - Accelerate MuleSoft development
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
 
UserCon Belgium: Honey, VMware increased my bill
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
 
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
Safe Software
 
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
Curietech AI in action - Accelerate MuleSoft development
Curietech AI in action - Accelerate MuleSoft development
shyamraj55
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 

Build the internet of things with Raspberry Pi!

  • 2. The recipe Hardware Stack • Raspberry Pi Model B (512 MB Ram) • Raspberry Pi Camera Module (2 MP) or any compatible USB Cam * • Ethernet Cable • Wifi dongle: Edimax EW-7811Un 150Mbps Wireless • SD Card ( 4 GB ++)
  • 3. The recipe Software Stack • • • • • • Raspbian OS Node.js (v 0.10.2 +) Python (V 2.7) Shell Scripts Twitter Stream API Google Drive API
  • 4. Downloading weapons Node.js on Raspberry Pi: https://github.com/DonaldDerek/rPi-cheat-sheet
  • 6. Connecting to your raspberry pi ssh-ing #Avahi Deamon should be installed ssh [email protected] #Static IP shh [email protected] Usefull Links: http://elinux.org/RPi_Advanced_Setup
  • 7. * Testing USB Cam Resurrecting ancient technologies #Test USB Camera Lsusb #Take images from RaspberryPi USB Camera fswebcam -d /dev/video0 -r 640x480 test.jpeg
  • 8. Testing Rpi 2mp cam Tiny yet amazing camera! raspistill –o test.jpg -w 640 -h 480
  • 10. App architecture Where all your scripts belong • node_modules/ • ntwitter/ • Request/ • bin/ • atom/ • gdata/ • gdrive.py • images/ • App.js • Config.js • Controller.js • Package.json • tw-upload.js
  • 11. Twitter stream api The communication layer is built upon Twitter’s infrastructure var twit = new twitter(config); // Check Credentials twit.verifyCredentials(function (err, data) { if(err) console.log(err); }) .stream('user', {track:watch}, function(stream) { console.log("Twitter stream is ready and waiting for inc tweets...") stream.on('data', function (data) { //Check if tweet is not empty if (data.text !== undefined) { //Action Code here } }); //Catch errors stream.on('error', function (err, code) { console.log("err: "+err+" "+code) });
  • 12. Child process Control anything you can do in the terminal child = exec("raspistill -o "+ image_path +" -w 640 -h 480", function (err, stdout, stderr) { //trigger another event })
  • 14. Google drive api Light-weight python script //Authenticate with Gdrive API try: docsclient.ClientLogin(username, password, docsclient.source); except (gdata.client.BadAuthentication, gdata.client.Error), e: sys.exit('Unknown Error: ' + str(e)) except: sys.exit('Login Error, perhaps incorrect username/password') print 'success!' Resources: http://planzero.org/blog/2012/04/13/uploading_any_file_to_google_docs_with_python
  • 16. May The Source be With you https://github.com/DonaldDerek/GoogleBeam DonaldDerek DerekHaddad rhamzeh r_hamzeh