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
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
2.1k
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
760
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
120
Deep Dive into ~/.claude/projects
hiragram
14
2.5k
RailsGirls IZUMO スポンサーLT
16bitidol
0
180
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
590
技術同人誌をMCP Serverにしてみた
74th
1
640
AI コーディングエージェントの時代へ:JetBrains が描く開発の未来
masaruhr
1
140
ソフトウェア品質を数字で捉える技術。事業成長を支えるシステム品質の マネジメント
takuya542
1
13k
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
220
dbt民主化とLLMによる開発ブースト ~ AI Readyな分析サイクルを目指して ~
yoshyum
3
1k
AI時代の『改訂新版 良いコード/悪いコードで学ぶ設計入門』 / ai-good-code-bad-code
minodriven
13
3.5k
Featured
See All Featured
How GitHub (no longer) Works
holman
314
140k
What's in a price? How to price your products and services
michaelherold
246
12k
We Have a Design System, Now What?
morganepeng
53
7.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
GitHub's CSS Performance
jonrohan
1031
460k
Code Reviewing Like a Champion
maltzj
524
40k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Visualization
eitanlees
146
16k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
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