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
Saturday Morning BreakfastSerial: Hacking Ardui...
Search
PyCon Canada
August 14, 2013
Education
180
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Saturday Morning BreakfastSerial: Hacking Arduinos in Python (Swift)
PyCon Canada
August 14, 2013
More Decks by PyCon Canada
See All by PyCon Canada
Job Security (in Python) (Christopher Neugebauer)
pyconca
2
560
Sad Panda Needs a Hug (Nina Zakharenko)
pyconca
0
490
Shopify Checkout (Chris Saunders)
pyconca
0
260
Skyfield and 15 Years of Bad APIs (Brandon Rhodes)
pyconca
0
460
Planting Open Source Seeds (Kenneth Reitz)
pyconca
0
180
Why Open Source Works (Alex Gaynor)
pyconca
0
250
How to learn Python in 5 Minutes (Daniel Moniz)
pyconca
0
1.1k
Sunday Morning Keynote (Karen Brennan)
pyconca
0
360
Saturday Morning Keynote (Jacob Kaplan-Moss)
pyconca
2
140
Other Decks in Education
See All in Education
Catecismo 26 #2 - Do Credo; Introdução ao 1º artigo
cm_manaus
0
160
[2026前期火5] 論理学(京都大学文学部 前期 第6回)「かつとまたはの規則」
yatabe
0
440
吉祥寺.pmは1つじゃない — 複数イベント並走運営の12年 —
magnolia
0
1.3k
2026年度春学期 統計学 第14回 分布についての仮説を検証する ― 仮説検定(1) (2026. 7. 2)
akiraasano
PRO
0
110
[2026前期火5] 論理学(京都大学文学部 前期 第3回)「形式言語と四つのキーワード:メタ・構成・意味論・ハーモニー」
yatabe
0
600
LinkedIn
matleenalaakso
0
4.4k
良書紹介08_ 頭のいい子がやっているすごいグラフの読み方
bunnchinn3
0
120
Where Data Meets Storytelling
georgesinnott
0
130
AIには考えられないことを考えられる人になるために
iqbocchi
1
200
自己紹介 / who-am-i
yasulab
6
7k
生成AI時代のエンジニア育成について考えてみた
akasan
0
180
[2026前期火5] 論理学(京都大学文学部 前期 第5回)「 ならばの問題演習・proof net・かつの規則」
yatabe
0
360
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
HDC tutorial
michielstock
2
750
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Context Engineering - Making Every Token Count
addyosmani
9
1k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
220
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
220
Producing Creativity
orderedlist
PRO
348
40k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
900
Java REST API Framework Comparison - PWX 2021
mraible
34
9.5k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
500
Transcript
BREAKFAST SATURDAY MORNING SERIAL by @SwiftAlphaOne
Note: I’m not Ryan Gosling @SwiftAlphaOne
ARDUINO! Let’s talk about
Why are developers cuckoo for arduino?
SIMPLE API
Giraffe Add Tiger Head Tigeraffe Arduino is Open Source
None
EVERYWHERE Now Available
LOTS OF EXAMPLES
GR-R-REAT! Arduino is
1 2 3 4 USB Serial Port Ground & Power
Digital Pins Analog Pins ARDUINO 101
HELLO WORLD “ ”
Download the IDE http://arduino.cc/en/main/software
Wire up a LED
Blink 1: Arduino int led = 13; void setup() {
pinMode(led, OUTPUT); } void loop() { digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000); }
Prototyping in C, Hey kids! is totally fun and easy.
“ ” - The Trix Rabbit
Friends don’t let Friends PROGRAM IN C.
THE INTERNETS? How do I talk to “ ”
#include <Ethernet.h> #include <SPI.h> EthernetClient client; String data = '{"foo":"bar"}';
void setup() { Ethernet.begin({0x90,0xA2,0xDA,0x00,0x55,0x8D}); } void loop() { if (client.connect("www.someapi.com",80)) { client.println("POST /api/v1/endpoints HTTP/1.1"); client.println("Host: www.someapi.com"); client.println("Content-Type: application/json"); client.print("Content-Length: "); client.println(data.length()); client.println(); client.print(data); client.println(); } }
#include <Ethernet.h> #include <SPI.h> EthernetClient client; String data = '{"foo":"bar"}';
void setup() { Ethernet.begin({0x90,0xA2,0xDA,0x00,0x55,0x8D}); } void loop() { if (client.connect("www.someapi.com",80)) { client.println("POST /api/v1/endpoints HTTP/1.1"); client.println("Host: www.someapi.com"); client.println("Content-Type: application/json"); client.print("Content-Length: "); client.println(data.length()); client.println(); client.print(data); client.println(); } } LOL
HORSEPOWER Limited .
A BETTER WAY! There must be
Feature Wishlist Language Agnostic Cross Platform Talks to the Internets
Complex Processing
FIRMATA http://firmata.org Follow your nose!
from pyfirmata import Arduino from time import sleep board =
Arduino('/dev/cu.usbmodem1411') ledPin = board.board.digital[13] while 1: ledPin.write(1) sleep(1) ledPin.write(0) sleep(1) Blink 2: pyFirmata
Johnny-Five ? Javascript Ruby Python
Cookies for breakfast!? Python ^
BREAKFASTSERIAL http://github.com/theycallmeswift/BreakfastSerial
$ pip install BreakfastSerial
from BreakfastSerial import Arduino, Led board = Arduino() led =
Led(board, 13) led.blink(1000) Blink 3: BreakfastSerial
None
Feature Wishlist Language Agnostic Cross Platform Talks to the Internets
Complex Processing
Language Agnostic Cross Platform Talks to the
Internets Complex Processing Feature Wishlist
Buttons, LEDs, & Sensors. “ ” Servos & buzzers too.
Lots of new components, added by devs like you!
SRSLY THO, I ACCEPT PULLS http://github.com/theycallmeswift/BreakfastSerial
M OAR!
ARDUINO.IO No, really. It’s coming. Go sign up. http://arduino.io
THANK YOU @SwiftAlphaOne theycallmeswift.com