Well this was fun. Ingredients:
- Makeblock Bluetooth module
To execute instructions from smartphone.
- LG Optimus Dynamic
Strapped on robot for sensors. WiFi to talk with Mission Control. Bluetooth to control robot.
- Tornado server
Runs on PC. Connects to phone via SL4A. Talks with web UI using websockets.
To stream sensor data from phone to web UI. Also relays commands from web UI to robot.
- Web UI
For rendering the accelerometer G-meter (not shown in video)
- HTML Canvas
I just used a 2-D grid and rectangles (fillRect) to draw the robot’s snail trail.
v = d/t; d = v*t
Estimate distance traveled by robot using motor “velocity” and time.
- Ye Olde Trigonometry
To convert bearing + distance traveled to x-y position in room.
You know, this could make a good school project. Lots of applied basic science, math and programming.
I promise to put up details and code in a later post 🙂
(If I forget, please email email@example.com and I’ll share everything with you.)