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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
500
Shopify Checkout (Chris Saunders)
pyconca
0
270
Skyfield and 15 Years of Bad APIs (Brandon Rhodes)
pyconca
0
470
Planting Open Source Seeds (Kenneth Reitz)
pyconca
0
180
Why Open Source Works (Alex Gaynor)
pyconca
0
260
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
Beyond the Prompt: Programming as a Pathway to Statistical Thinking
minecr
0
340
チームの鏡になるー自分の癖を知ると、チームのパターンが見えてくる@スクフェス仙台
saorimurooka
0
160
Soluciones al examen de Geografía 2026. JUNIO (Convocatoria Ordinaria)
juanmartin2026
1
9.5k
SFプロトタイピング体験(滝中学校)
yusk1450
PRO
0
130
Visionary Initiative: Materials-Positive Society — Evolving “Things,” empowering a positive society | Science Tokyo
sciencetokyo
PRO
0
230
[2026前期火5] 論理学(京都大学文学部 前期 第13回)「走って、止まって、積み上がる」
yatabe
0
210
私たちはなんでテストするんだっけ? Ver.東北IT物産展2026 in 会津若松
camel_404
3
180
悩め!!言ってみろ!!
kazuki19992
0
110
[2026前期火5] 論理学(京都大学文学部 前期 第8回)「正規化定理の証明」
yatabe
0
320
AIには考えられないことを考えられる人になるために
iqbocchi
1
240
遊ぶかね欲しさの犯行(ルビ:労働)です
shirayanagiryuji
0
250
Lectura 2 (PIT : Python Basico)
robintux
0
430
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Technical Leadership for Architectural Decision Making
baasie
3
550
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
640
sira's awesome portfolio website redesign presentation
elsirapls
0
380
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Agile that works and the tools we love
rasmusluckow
331
22k
Abbi's Birthday
coloredviolet
3
9.6k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
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