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
Rock 'em Socket.IO Bots
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ari Rizzitano
September 05, 2013
Programming
760
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rock 'em Socket.IO Bots
How I used Socket.IO, TBone.js, a Raspberry Pi, and an RC car to build a telepresence robot.
Ari Rizzitano
September 05, 2013
More Decks by Ari Rizzitano
See All by Ari Rizzitano
Building Accessible Components
arizzitano
1
580
The Future of Frontend Development in Open edX
arizzitano
1
280
What the -dux?
arizzitano
0
250
Other Decks in Programming
See All in Programming
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
280
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
190
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
JavaDoc 再入門
nagise
0
300
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
730
Oxcを導入して開発体験が向上した話
yug1224
4
290
CSC307 Lecture 17
javiergs
PRO
0
320
3Dシーンの圧縮
fadis
1
670
さぁV100、メモリをお食べ・・・
nilpe
0
130
LLM Plugin for Node-REDの利用方法と開発について
404background
0
160
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
120
OSもどきOS
arkw
0
470
Featured
See All Featured
From π to Pie charts
rasagy
0
200
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
A Soul's Torment
seathinner
6
2.9k
We Are The Robots
honzajavorek
0
240
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
ラッコキーワード サービス紹介資料
rakko
1
3.6M
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
460
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
200
Transcript
Ari Rizzitano // @arizzitano // AppNeta Rock ‘em Socket.IO Bots
Our Team
Telepresence Robots $2500 $6000 $15K $70K
+ +
PETBOT • iPad on lightweight chassis on RC car •
Raspberry Pi powers car’s radio transmitter • Battery pack or wall wart for Pi • Web UI & remote Socket.IO server control Pi
PETBOT
The “Brain” • Two node servers, one remote & one
local • Remote: serves UI, receives & sends commands • Local: relays commands as electronic signals
Control Flow
TBone.js • Reactive, data-flow-oriented programming • Models, views, live templates
• tbonejs.org • github.com/appneta/tbone
TBone.js • T(‘model.propName’, ‘value’): set a value • T(‘model.propName’): lookup
• T(function () { console.log(T(‘model.propName’)); }); • ^Executes when internal T-references change
Remote Client • Control with arrow keys • T(‘drive’): state
of keys pressed • T(‘keepDriving’): heartbeat to continue signaling
Remote Server • T(‘drive’): current drive state • T(‘bots’): clients
listening for commands • T(‘browsers’): clients controlling the bot(s) • T(‘botOnline’): whether a bot is connected
Sync (the old way)
Sync (TBone style)
Sync (TBone style)
Local Server • Connects to remote server as a client
• Receive synced events and data • Send bot state back to remote server
Working with Pi • 256MB RAM, runs Raspbian (Wheezy) •
Build and install NPM from source • Power management can be an issue • autorun.sh for syncing changes
GPIO • NPM: gpio or pi-gpio • github.com/quick2wire/quick2wire-gpio-admin
raspi.js • Extends LocalServer • Open and close gpio pins
• Write to pins on drive event start and end • Other board modules can work the same way
TODO • Move off Heroku (and use real websockets) •
Build and test modules for other boards • Write tests and benchmark latency • Simulation, mapping, position tracking
Future Projects • Differential drive/hardware upgrades • WebRTC/Android tablet •
LCD and webcam powered by Pi • Unified rechargeable power source • Generic components and 3D printable parts
Demo time!
Check it out! • github.com/arizzitano/petbot • github.com/appneta/tbone •
[email protected]
, @arizzitano