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
770
Live Highlights in BBC iPlayer
bennuttall
0
190
Rapid prototyping in BBC News with Python and AWS
bennuttall
0
250
Rapid prototyping in BBC News with Python and AWS
bennuttall
0
190
Running a Python Package Index for Raspberry Pi
bennuttall
0
220
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
310
Other Decks in Programming
See All in Programming
sbt 2.0: takeoff
eed3si9n
0
160
contenteditable と日本語入力に向き合う
colorful12
0
200
R8 の設定見直しでアプリサイズ削減
andpad
0
220
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
170
パスワード再設定メールのURLについて知っておこう
uyuki234
0
160
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
590
Domain-Driven Transformation
hschwentner
2
2.3k
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
10k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Chasing Engaging Ingredients in Design
codingconduct
0
360
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
The Language of Interfaces
destraynor
162
27k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Tell your own story through comics
letsgokoyo
1
1.1k
Leo the Paperboy
mayatellez
10
2.4k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
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