Skip to content
Snippets Groups Projects
Stephen Downward's avatar
Stephen D authored
Fixed critical bug in military drive that caused both wheels to ramp up to 100% immediately on launch
a02ce976
History
Name Last commit Last update
Client Program
.gitignore
README.md
Robot.ino

Drillmotor-Robot

This is the code I wrote to run on a rather overengineered robot I built. The intention of the robot is for remote viewing of my house. I have had a few friends try driving it from their houses, showing it works.

An Arduino Mega is the brain of the platform. It has an Ethernet shield which is connected to an old Linksys WRT54G router(Running DD-WRT of course!) Robot.ino runs on the robot and accepts remote connections. Port 97 is forwarded from it to the outside world.

The client connects to it through this port, allowing for control. In addition, the robot has an IP camera, which is port forwarded to port 98. A java applet runs on the client for this.

The robot also has basic safety mechanisms. If the client disconnects, it cuts the motors. Previous versions of the robot did not have this feature, which resulted in the robot driving down stairs. It can also detect when a client has uncleanly disconnected, and terminate them, allowing for them to reconnect. Previously, it would hang, requiring a reset to fix. It also only allows for a single connection at a time.

There are 2 versions of the client. One uses WASD or clicking on-screen buttons to drive the robot. The other uses a USB controller, in a military drive configuration(One joystick controls the left wheel, the other controls the right wheel)