Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
South London Pioneers - Picamera
Search
Ben Nuttall
May 21, 2017
Programming
1
60
South London Pioneers - Picamera
Ben Nuttall
May 21, 2017
Tweet
Share
More Decks by Ben Nuttall
See All by Ben Nuttall
Numeronyms are obnoxious
bennuttall
0
420
Live Highlights in BBC iPlayer
bennuttall
0
120
Rapid prototyping in BBC News with Python and AWS
bennuttall
0
180
Rapid prototyping in BBC News with Python and AWS
bennuttall
0
130
Running a Python Package Index for Raspberry Pi
bennuttall
0
160
From Acorns to Raspberries
bennuttall
0
140
Innovation in the newsroom
bennuttall
0
180
Innovation in the newsroom - MOS Running Order Manager
bennuttall
0
200
How to market your open source project
bennuttall
0
250
Other Decks in Programming
See All in Programming
Basic Architectures
denyspoltorak
0
130
Deno Tunnel を使ってみた話
kamekyame
0
260
SwiftUIで本格音ゲー実装してみた
hypebeans
0
510
Grafana:建立系統全知視角的捷徑
blueswen
0
240
Java 25, Nuevas características
czelabueno
0
120
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
39
26k
Patterns of Patterns
denyspoltorak
0
370
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
490
ゲームの物理 剛体編
fadis
0
380
PostgreSQLで手軽にDuckDBを使う!DuckDB&pg_duckdb入門/osc25hi-duckdb
takahashiikki
0
190
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
410
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
480
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Darren the Foodie - Storyboard
khoart
PRO
0
2k
Faster Mobile Websites
deanohume
310
31k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
52
How to build a perfect <img>
jonoalderson
0
4.8k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
32
Done Done
chrislema
186
16k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
170
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
38
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
74
The Limits of Empathy - UXLibs8
cassininazir
1
190
Believing is Seeing
oripsolob
0
16
Transcript
Python Picamera with the Sense HAT Introducing the camera board
and Python module
Raspberry Pi camera module - 5Mpx / 8Mpx - Full
HD - Photo & video - Command line - Python module - Infra-red camera
Connect the camera
Open Python 3
IDLE Python Shell >>> from picamera import PiCamera >>> from
sense_hat import SenseHat >>> camera = PiCamera() >>> sense = SenseHat() >>> sense.stick.direction_up = camera.start_preview >>> sense.stick.direction_down = camera.stop_preview
Open a new file • File > New File •
File > Save • Save as camera.py
Take a selfie from picamera import PiCamera from time import
sleep camera = PiCamera() camera.start_preview() sleep(3) camera.capture("/home/pi/image.jpg") camera.stop_preview() Save and run: Ctrl + S F5
Add joystick code from picamera import PiCamera from sense_hat import
SenseHat from time import sleep camera = PiCamera() sense = SenseHat() camera.start_preview() sense.stick.wait_for_event(True) sleep(3) camera.capture("/home/pi/sense.jpg") camera.stop_preview()
Picamera effects
Picamera effects camera.start_preview() sense.stick.wait_for_event(True) camera.image_effect = 'negative' sleep(5) camera.capture("/home/pi/negative.jpg") camera.stop_preview()
Try more effects: - negative - colorswap - sketch - emboss
Picamera effects import random camera.start_preview() for i in range(5): sense.stick.wait_for_event(True)
effect = random.choice(list(camera.IMAGE_EFFECTS)) camera.image_effect = effect camera.annotate_text = effect sleep(5) camera.capture("/home/pi/{}.jpg".format(effect)) camera.stop_preview() Try more effects: - negative - colorswap - sketch - emboss
Documentation and help guides • picamera.readthedocs.io • pythonhosted.org/sense-hat • raspberrypi.org/resources
What next? • Time-lapse • Stop motion animation • Wildlife
camera
What next? • Sensor trigger • Send to social media
• Robotics