Exercise: Extending 3pi - Inputs

Objective

You can extend the built-in capabilities of your 3pi robot in several ways. One can add additional sensors and actuators to the 3pi robot by utilizing the unused digital and anlog input and output pins available on the  ATmegaxx8  microcontroller as indicated in the 3pi pin assignments table. Note that since SPI and I2C are not readily available to 3pi users, we are limited to working with analog sensors.

Steps and observations

  1. Add an IR distance sensor to the 3pi that senses by wiring it to one of the free analog input pins on the 3pi (i.e. {PC5, ADC6, ADC7} which respectively map to arduino pins {5, 6, 7}). Fasten the sensor to the front of the robot.
  2. Write a program that maps values from this sensor to some motor activity; specifically, write a program that detects obstacles in the robots way; make it so that when the robot gest too close to an obstacle (~2 inches), it reverses, turns and goes forward in a different direction.
  3. Experiment with different approaches to how the robot backs up and turns to choose a new direction

Comments

 

Other Files

  1. Pololu 3pi Components and Pin Assignment Table