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
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
0
510
Live Highlights in BBC iPlayer
bennuttall
0
160
Rapid prototyping in BBC News with Python and AWS
bennuttall
0
230
Rapid prototyping in BBC News with Python and AWS
bennuttall
0
170
Running a Python Package Index for Raspberry Pi
bennuttall
0
190
From Acorns to Raspberries
bennuttall
0
170
Innovation in the newsroom
bennuttall
0
230
Innovation in the newsroom - MOS Running Order Manager
bennuttall
0
250
How to market your open source project
bennuttall
0
290
Other Decks in Programming
See All in Programming
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
2
550
継続モナドとリアクティブプログラミング
yukikurage
3
610
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
190
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.5k
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.9k
act2-costs.pdf
sumedhbala
0
110
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
190
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
130
yield再入門 #phpcon
o0h
PRO
0
500
OSINT for SRE: 学術論文とポストモーテムから探る システム障害の共通パターン / SRE NEXT 2026
tomoyk
1
3.9k
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
140
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
320
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
24k
Faster Mobile Websites
deanohume
310
32k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Abbi's Birthday
coloredviolet
3
8.7k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
280
The SEO identity crisis: Don't let AI make you average
varn
0
520
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
610
How to make the Groovebox
asonas
2
2.3k
sira's awesome portfolio website redesign presentation
elsirapls
0
300
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Facilitating Awesome Meetings
lara
57
7k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
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