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
560
The Future of Frontend Development in Open edX
arizzitano
1
260
What the -dux?
arizzitano
0
240
Other Decks in Programming
See All in Programming
Migration to Signals, Resource API, and NgRx Signal Store
manfredsteyer
PRO
0
140
EMこそClaude Codeでコード調査しよう
shibayu36
0
570
Developer Joy - The New Paradigm
hollycummins
1
400
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
9.5k
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
250
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
710
alien-signals と自作 OSS で実現する フレームワーク非依存な ロジック共通化の探求 / Exploring Framework-Agnostic Logic Sharing with alien-signals and Custom OSS
aoseyuu
3
5.5k
AsyncSequenceとAsyncStreamのプロポーザルを全部読む!!
s_shimotori
1
230
Blazing Fast UI Development with Compose Hot Reload (droidcon London 2025)
zsmb
0
450
Dive into Triton Internals
appleparan
0
420
スキーマ駆動で、Zod OpenAPI Honoによる、API開発するために、Hono Takibiというライブラリを作っている
nakita628
0
340
Vue 3.6 時代のリアクティビティ最前線 〜Vapor/alien-signals の実践とパフォーマンス最適化〜
hiranuma
2
370
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
950
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Automating Front-end Workflow
addyosmani
1371
200k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
640
Documentation Writing (for coders)
carmenintech
76
5.1k
It's Worth the Effort
3n
187
28k
Embracing the Ebb and Flow
colly
88
4.9k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
Producing Creativity
orderedlist
PRO
348
40k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Designing Experiences People Love
moore
142
24k
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