/ArduinoRobot

Arduino Line Follower Code - 2WD Robot Chassis, Uno, Motor Shield V2, SunFounder Line Follower Module.

Primary LanguageC

ArduinoRobot

For issues and questions please raise the question here.

https://github.com/RattyDAVE/ArduinoRobot/issues

Quick install instructions.

git clone https://github.com/RattyDAVE/ArduinoRobot.git ~/ArduinoRobot
cp -R ~/ArduinoRobot ~/Arduino

For the Sunfounder Line Follower Library

https://github.com/RattyDAVE/ArduinoRobot/tree/master/libraries/SunFounderLineFollower

Items Ordered.

https://github.com/RattyDAVE/ArduinoRobot/wiki/Items-Ordered

Library files

https://github.com/RattyDAVE/ArduinoRobot/wiki/Library-files

Milestones

  • Using the Motor shield and Arduino only. Move the robot in a SQUARE. Forward for 5 seconds. Turn Right 90 deg. Forward for 5 seconds. Turn Right 90 deg. Forward for 5 seconds. Turn Right 90 deg. Forward for 5 seconds. Turn Right 90 deg. So roughly at the start point. Closest to start point wins.
  • Same as 1 but LEFT 90 deg. Closest to start point wins.
    1. and 2) combined in a random selection. Dice will be thrown for number of LEFT turns another dice for number of right turns. These will then go in to a “hat” and pulled out so in a random order. EG. 1st Dice (for Left) is 3, 2nd Dice (For right) is 5. 3 bits of paper marked with a L are put in the bag and 5 are written with R. Then they are mixed up and pulled out. So you may get the pattern RLRLRLRR. Closest to start point wins.
  • Using the Line sensor follow a straight line and stop when the line ends within the stop zone that is 15cm. QUICKEST wins.
  • Same as 4) but with corners. (Radius of no more than 15cm). QUICKEST wins (within 15cm stop zone).

Pins Used.

https://github.com/RattyDAVE/ArduinoRobot/wiki/Pins-Used

I2C Bus Address

https://github.com/RattyDAVE/ArduinoRobot/wiki/I2C-Bus-Address