Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
South London Pioneers - Picamera
Search
Ben Nuttall
May 21, 2017
Programming
64
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
South London Pioneers - Picamera
Ben Nuttall
May 21, 2017
More Decks by Ben Nuttall
See All by Ben Nuttall
Numeronyms are obnoxious
bennuttall
1
730
Live Highlights in BBC iPlayer
bennuttall
0
180
Rapid prototyping in BBC News with Python and AWS
bennuttall
0
250
Rapid prototyping in BBC News with Python and AWS
bennuttall
0
180
Running a Python Package Index for Raspberry Pi
bennuttall
0
210
From Acorns to Raspberries
bennuttall
0
180
Innovation in the newsroom
bennuttall
0
240
Innovation in the newsroom - MOS Running Order Manager
bennuttall
0
260
How to market your open source project
bennuttall
0
300
Other Decks in Programming
See All in Programming
Java 27新機能 / Java 27 new features
kishida
2
150
WebAssembly in Android Apps 〜 WASMはJNIの夢を見るか
keiji
1
100
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
1.9k
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
720
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2k
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
110
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
160
App Intentsのビルドプロセスを支える技術
kntkymt
0
380
Are APIs Still Relevant in the AI Era?
soyuka
0
230
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
130
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
350
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.4k
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
7.1k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
280
Navigating Team Friction
lara
192
16k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
230
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
sira's awesome portfolio website redesign presentation
elsirapls
0
410
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Designing Experiences People Love
moore
143
24k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
350
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