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
760
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
570
The Future of Frontend Development in Open edX
arizzitano
1
270
What the -dux?
arizzitano
0
240
Other Decks in Programming
See All in Programming
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
4
660
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
160
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
1.4k
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
200
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
130
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
320
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
510
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
8
2.2k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
140
nilとは何か 〜interfaceの構造とnil!=nilから理解する〜 / Understanding nil in Go Interface Representation and Why nil != nil
kuro_kurorrr
3
1.6k
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
210
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.1k
Designing Powerful Visuals for Engaging Learning
tmiket
0
250
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
950
sira's awesome portfolio website redesign presentation
elsirapls
0
170
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
150
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
750
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Building Adaptive Systems
keathley
44
2.9k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
190
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