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
240
How to learn Python in 5 Minutes (Daniel Moniz)
pyconca
0
1.1k
Sunday Morning Keynote (Karen Brennan)
pyconca
0
340
Saturday Morning Keynote (Jacob Kaplan-Moss)
pyconca
2
140
Other Decks in Education
See All in Education
SARA Annual Report 2025-26
sara2023
1
380
Case Studies - Lecture 12 - Information Visualisation (4019538FNR)
signer
PRO
0
150
勾配ブースティングと決定木の話 / gradient boosting and decision trees
kaityo256
PRO
6
1.3k
[2026前期火5] 論理学(京都大学文学部 前期 第3回)「形式言語と四つのキーワード:メタ・構成・意味論・ハーモニー」
yatabe
0
560
Portable & Reproducible Research Environments in the Age of AI Agents
denkiwakame
0
380
2026年度春学期 統計学 第1回 イントロダクション ー 統計的なものの見方・考え方について (2026. 4. 9)
akiraasano
PRO
0
170
現場最前線から教えるデータサイエンス1 -ITベンダーにおけるデータサイエンティスト-
hidetoshikawaguchi
0
110
Catecismo 26 #1 - Aula inaugural
cm_manaus
0
180
Data Physicalisation - Lecture 9 - Next Generation User Interfaces (4018166FNR)
signer
PRO
1
1.1k
Alumnote inc. Company Deck
yukinumata
1
20k
✅ レポート採点基準 / How Your Reports Are Assessed
yasslab
PRO
0
370
Lectura 2 (PIT : Python Basico)
robintux
0
360
Featured
See All Featured
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
170
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
Test your architecture with Archunit
thirion
1
2.3k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
630
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
370
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
400
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Ethics towards AI in product and experience design
skipperchong
2
310
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