Joystick Line Follower

After I was done with version 1 of my claw bot, I wanted to use what I learned to take my line following robot to the next level. This involved developing a little joystick app that could switch between joystick mode and line following mode.

I first just tried to have two scroll bars to control the speed an direction of the treads, but this proved to be unsuccessful because the phone was unable to easily process two simletaneous moving fingers.

Then I simply made a circular target that controlled the speed of the motors such that when you pushed forward the bot moved forward, right, left etc. I did this by having the x axis control the speed of the left motor, y axis speed of the right motor. The key learning was that I needed to rotate the axis by 45 degrees counter clockwise so that forward direction is intuitive to the user.

Once the joystick was taken care of, I made a button to switch between the two modes. The key learning on this step is to disable any “Serial.print” commands on the arduino program so that the Serial line doesn’t get overburdened.

Overall it works pretty well – check out the video below!