Potentiometer Feedback

Well, I am new to programming in C. I have good experience with technical computing languages like matlab, but I am slowly learning C. I am a mechanical engineer by trade ( well, I am graduating this semester) and therefore am not extremely familiar with programming a micro controller. I have purchased the Orangutan X2 Robot controller. I am using it to control two separate linear actuators for a project this semester that have a built in potentiometer feedback for position control. I think that I have figured out the majority of the programming except for the most important part, reading in the feedback. I have searched the forum but have found nothing that answers my questions. What is the easiest way to read in a voltage signal through an I/O pin on the micro controller (the ATMega644 for the Orangutan X2)? I need a way to read it in and track it so I can brake my motors when needed. I am completely clueless and may be asking a very open ended question, but any help would be appreciated.

Thanks

Hello.

Please take a look at this thread:

It links to a couple of threads that will hopefully be helpful to you. In addition, you can use the analog section of the Pololu AVR library as a reference. The analog input pins on the ATmega644 are pins PA0 - PA7; PA6 is connected via an SMT jumper to the battery voltage, and PA7 is connected via an SMT jumper to the user trimpot, so I would recommend using PA0 - PA5 for your sensors.

Note that the Orangutan X2 demo code provided under the resources tab of the product page has code that reads the user trimpot, so this could be a good starting point for your own program.

- Ben

Thank you so much. That helps alot. Part of the problem was that I didn’t know what I was looking for. Thanks again for your help.