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
570
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
Developing static sites with Ruby
okuramasafumi
0
340
開発に寄りそう自動テストの実現
goyoki
2
1.6k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
CSC307 Lecture 01
javiergs
PRO
0
650
はじめてのカスタムエージェント【GitHub Copilot Agent Mode編】
satoshi256kbyte
0
130
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2k
Patterns of Patterns
denyspoltorak
0
410
TestingOsaka6_Ozono
o3
0
240
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
4.1k
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
36k
SQL Server 2025 LT
odashinsuke
0
120
チームをチームにするEM
hitode909
0
430
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
76
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Prompt Engineering for Job Search
mfonobong
0
130
Between Models and Reality
mayunak
1
150
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
74
Code Review Best Practice
trishagee
74
19k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
100
Ethics towards AI in product and experience design
skipperchong
1
150
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Being A Developer After 40
akosma
91
590k
Navigating Team Friction
lara
191
16k
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