Skip to content
/ telebot Public

Bash and nodejs scripts to remotely drive a robot car powered by Android & Arduino

Notifications You must be signed in to change notification settings

vkonst/telebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TeleBot

"Quick & dirty" scripts to remotely drive a robot car powered by Android & Arduino

Created to let my adult children feel like "coming home" sometimes and to enable my experiments on integration of robots with Ethereum smart-contracts.
alt text

System overview

An Adroid phone is mounted on the "car" and drives the motors via an Arduino board.

A remote linux host accessible from the Internet (an AWS ec2 instance) acts as a proxy. Bash scripts in "scripts" folder automate establishing connections.

The user interacts with the bot remotely via a web-browser.
The UI supports streaming video/audio from the Andoid phone and driving remotely (moving) the bot (wheels) via keyboards.
The user commands get sent via websockets protocol ("socket.io").

Video/audio stream from the car is generated by the "IP web-cam" android app and forwarded by the node.js web-server that the Android phone runs.
The web-server runs on node.js (express.js + "http-proxy-middleware") inside the "Termux" android app. Node.js listens to commands and controls the Arduino board over "Firmata" protocol ("johny-five" lib).

Sensors and motors are connected to the Arduino Nano board that runs "Firmata".
The Arduino Nano board runs "Firmata" software. It is connected to the Android phone via USB OTG.

As the "johny-five" lib can not directly communicate to serial devices over a USB port on Android:

  • the "TCP_serial port" application re-directs the connection to a TCP port
  • the "etherserial" module provides the "johny-five" lib with support of TCP connections

The hardware

alt text

  • 4-wheels chassis with 2 motors
  • Old Android phone
  • 10000 mAh rechargeable battery
  • Arduino Nano
  • HC-SR04 sonar sensor
  • Servo for the sonar
  • Arduino Pro mini as a controller for the sonar
  • 3 "dry contact" sensors
Software for Android
Software for arduino
Remote and cloud servers
  • dyndns.net service used to link AWS server to a fixed "URL" (ex.: "[email protected]")
  • AWS ec2 instance running linux + openssh-server acts as a proxy

About

Bash and nodejs scripts to remotely drive a robot car powered by Android & Arduino

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published