Meet the Popolino!


Popolino is gaining shape. After a couple of obstacles, found while working with Arduino Duemilanove - not enough timers to run the DC motors and the servo at the same time - This small bot is now ready to roll.

At this point the system comprises:

  • 2 DC motors,
  • 1 servo,
  • 1 Ir sensor,
  • an Arduino Mega 2560 as the brain,
  • and an Ardumoto shield to drive the DC motors.

The algorithm is quite simple: It starts by going forward until the sensor detects an obstacle at a certain distance. It then stops, looks left and right. Moves back and decides which direction to turn based on the information it gathered when the sensor "looked" left and right.

The code can be downloaded from  the link bellow.

 

The video is here  

 

 

 

AttachmentSize
Arduino sketch4.73 KB