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
Where does the javascript run, anyway?
Search
C J Silverio
November 15, 2013
Programming
420
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Where does the javascript run, anyway?
A beginner's guide to hardware with Javascript.
C J Silverio
November 15, 2013
Transcript
32 slides
Where does the javascript run, anyway? A beginner’s guide to
js + hardware C J Silverio @ceejbot
Tab Hunter easily located?
I never tracked the cat.
Then I went to a hack day.
None
That’s a cat about to be tracked.
Text Let’s talk microcontrollers. Arduino, Raspberry Pi, Beaglebone, and beyond.
Hardware input & output What the Arduino & the Pi
have in common: inputs and outputs.
Connect to the physical world. Turn lights on & off.
Run motors. Fire missiles at nodecopters. !
General-purpose I/O aka the GPIO or the “pin”
The super power of a microcontroller is the GPIO. The
GPIO connects variables in software to physical objects: the power level on a wire is information.
Breadboard 101 The + and – columns are connected. The
rows are connected. Board +/5V ➜ + Board ground ➜ –
Lighting an LED is simple. Power to breadboard resistor from
+ to long wire on the LED LED short wire to breadboard – – to board GND
Software! Decision-making! Now we make the microcontroller do some work.
Text Arduino Easy to start with! Lots of GPIO pins.
Text Button: a typical circuit power, ground, control signal software
on the Arduino to read its state
We’re about to get the javascript into it.
Johnny-Five to the rescue StandardFirmata sketch ➜ Arduino npm install
johnny- five write javascript
Async Goodness with Buttons ! var five = require('johnny-five'); var
board = new five.Board(); ! board.on('ready', function() { // signal goes into arduino pin 8 var button = new five.Button(8); ! button.on('down', function() { console.log('down'); }); button.on('up', function() { console.log('up'); }); button.on('hold', function() { console.log('holding'); }); });
Tethered. :( You need to stay connected to a host
capable of running Node.js, which the Arduino is not.
Upgrade the microcontroller! Let’s move from the early 80s to
the late 90s.
None
You run Linux on these. OMG.
Decisions, decisions. Arduino tiny Arduinos Raspberry Pi Beagle cheap cheaper
CPU! more CPU! 14 pins size varies 8 pins 65 pins lots of modules features vary great video more memory C++ js tethered C++ any language any language prototyping mobile projects general use, audio-vis CPU-intensive lots of connections
Text Cat Tracker uses 2 boards Teensy on the cat,
Beaglebone at the cat door
Next gen Tessel Espruino Javascript as first-class language
Next steps! Go to a hack day! http://nodebots.io Run a
hack day!
http://node-ardx.org The Arduino experimenter’s guide for Javascript
Practical Electronics for Inventors Paul Scherz & Simon Monk
Play! Putter around. Buy two of everything because you will
melt things sometimes. It’ll be okay.
Learn strange new things. USB? Bluetooth? Serial? Radios? Reverse-engineer something!
Go forth & build!
More Decks by C J Silverio
See All by C J Silverio
The economics of package management
ceejbot
4
1.6k
The future of (javascript) modules (in node)
ceejbot
1
350
Keeping JavaScript safe
ceejbot
3
510
ceej's how to solve it
ceejbot
6
790
work-life balance at npm
ceejbot
5
820
hash functions and you!
ceejbot
2
400
The accidental noder
ceejbot
2
190
Design Patterns & Modularity in the npm Registry
ceejbot
3
230
Monitoring on a budget
ceejbot
2
320
Other Decks in Programming
See All in Programming
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
210
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
640
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
430
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
400
Compiling Your Language to WasmGC & Friends
tanishiking
0
140
Distance field of Julia set
kinakomoti321
0
330
[DroidKnights 2026] Workflow AX 적용기 — 자동 정책 정리부터 E2E까지
dayeon
0
120
将来の標準フォーマッター?ktfmtを深堀る
t45k
1
250
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
330
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
440
Stage 3でも仕様は変わる。アプリケーション開発者のためのTC39プロセスの読み方
bicstone
1
240
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
340
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
610
Amusing Abliteration
ianozsvald
1
400
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
Color Theory Basics | Prateek | Gurzu
gurzu
1
530
Designing for humans not robots
tammielis
254
26k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
Code Review Best Practice
trishagee
74
20k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Unsuck your backbone
ammeep
672
58k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.5k
Test your architecture with Archunit
thirion
2
2.5k