3rd Analog Input for 3PI

The place to discuss the Pololu 3pi robot and share your code.

3rd Analog Input for 3PI

Postby tamz273 on Thu Jul 15, 2010 5:45 am

Hey all,

Im currently using two IR sensors to sense distance on my 3PI, and am looking to add a third one. Im already using ports 5 and 7, and was wondering how I could change a 3rd port to analog input. Is this possible with the 3pi? And also, what would I be sacrificing in order to get this?

Thanks


EDIT:
I took out the jumper for ADC6 and attempted to use it, seems fine.. If any problems arise I will post questions!
tamz273
 
Posts: 4
Joined: Tue Jun 15, 2010 9:28 am

Re: 3rd Analog Input for 3PI

Postby RyanTM on Thu Jul 15, 2010 10:10 am

Hello.

It sounds like you are making somthing similar to this wall follower sample project.

Here is a note from the project:

Note: Do not use any of the Pololu AVR library’s line sensor functions while your distance sensor is connected to PC5. Even with the PC5 jumper disconnected, the library’s line sensor routines will attempt to control the emitters by driving PC5 high for the duration of the sensor read and then driving PC5 low. You want PC5 to remain an input for duration of the time it is connected to your sensor.


Since you are using PC5, I recommend calling the
Code: Select all
pololu_3pi_init_disable_emitter_pin(unsigned int line_sensor_timeout)
function instead of the regular init function. More information about this can be found in the 3pi command reference.

-Ryan
User avatar
RyanTM
 
Posts: 284
Joined: Mon May 19, 2008 1:00 pm


Return to 3pi Robot

Who is online

Users browsing this forum: No registered users and 1 guest