In this 3 part project we’ll see how to program an autonomous robot car using Embrio. The car has 3 behaviors. It wanders around, avoiding obstacles by turning away from near by walls and stopping before hitting a wall. Every so often it stops and randomly turns. When the car gets stuck, it backs up and turns until it is free. A button lets you turn the car on and off, and a potentiometer lets you set the maximum drive speed. It uses a RGB LED to indicate the current behavior and status.

View discussion page on forum


Parts List

  • Arduino Mega
  • 1 x Motor Controller
  • 2 (or 4) x DC Motors
  • Breadboard
  • 1 x Robot Car Chassis
  • Various Jumper Wires
  • 1 x Yellow LED
  • 1 x RGB LED
  • 4 x 270 Ohm Resistors
  • 1 x 10k Potentiometer
  • 3 x Sharp Infrared Proximity Sensor Long Range
  • 1 x Button
  • 1 x 10X Resistor
  • 1 x Switch
  • 1 x 6V Battery

Part 1 first goes over the finished product, then starts from the beginning by encapsulating access to the physical inputs and outputs of the robot.

Part 2 builds up mid-level control agents that sit above the low level IO access set up in part 1, and will be used by the high level behaviors in part 3.

In part 3 the top level behavior control agents are created. The top level control switches between the “wander” and “random turn” behaviors, and another agent turns on the “escape” agent when the car gets stuck.

View discussion page on forum