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
Ari Rizzitano
September 05, 2013
Programming
1
750
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
Tweet
Share
More Decks by Ari Rizzitano
See All by Ari Rizzitano
Building Accessible Components
arizzitano
1
550
The Future of Frontend Development in Open edX
arizzitano
1
250
What the -dux?
arizzitano
0
230
Other Decks in Programming
See All in Programming
技術同人誌をMCP Serverにしてみた
74th
1
640
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
1
10k
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
160
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
130
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
270
生成AI時代のコンポーネントライブラリの作り方
touyou
1
210
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
2
640
dbt民主化とLLMによる開発ブースト ~ AI Readyな分析サイクルを目指して ~
yoshyum
3
1k
10 Costly Database Performance Mistakes (And How To Fix Them)
andyatkinson
0
330
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
550
AI駆動のマルチエージェントによる業務フロー自動化の設計と実践
h_okkah
0
150
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
1
440
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
What's in a price? How to price your products and services
michaelherold
246
12k
Building Adaptive Systems
keathley
43
2.7k
4 Signs Your Business is Dying
shpigford
184
22k
A Modern Web Designer's Workflow
chriscoyier
695
190k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Being A Developer After 40
akosma
90
590k
Gamification - CAS2011
davidbonilla
81
5.4k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
6
300
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
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