Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Potentiometer (http://www.chiefdelphi.com/forums/showthread.php?t=91154)

Ross3098 16-12-2011 09:14

Re: Potentiometer
 
Sorry but our potentiometer is still not working. Potentiometer is hooked up to Analog Channel #2. Power is going to the analog module.

Code for printing is as follows:

(Im typing it because its on a different computer.)

Code:

AnalogChannel *m_Pot;
///////////////////////////
m_Pot = new AnalogChannel(2);
///////////////////////////
if (m_gamepad1->GetButton07() == 1){

m_LCD->Printf(DriverStationLCD::kUser_Line3,1,"v: %4f",m_Pot->GetVoltage());
m_LCD->UpdateLCD();

Driver Station is reading a constantly changing value ~0.003 that is sometimes negative.

:confused: :confused: :confused: :confused: :confused:

Alan Anderson 16-12-2011 09:27

Re: Potentiometer
 
Quote:

Originally Posted by Ross3098 (Post 1091607)
Potentiometer is hooked up to Analog Channel #2.

How exactly is it connected? There should be three wires. Where does each of them go?

When you measure the voltage with a meter, does it do what you expect?

Ross3098 16-12-2011 09:59

Re: Potentiometer
 
Not in the room atm but I'm sure that all three wires are connected to a pwm which then feeds into the analog module. It hasnt been changed (or at least not that I know of because OCCRA happened and fuses/pwms were taken off of the robot.) since last competition.

Al Skierkiewicz 16-12-2011 11:03

Re: Potentiometer
 
Colin,
Assuming that the code is functional, the reading sounds like what I would expect with a shorted wire. Use a voltmeter and check at both the pot and the wiring entry to the analog module.

Ross3098 16-12-2011 16:49

Re: Potentiometer
 
*Facepalm* once again on our team the fault is not programming it is electrical. The solder holding the positive wire to the potentiometer broke off.

Only noticed after trying to stick a volt meter down there.....:rolleyes:

Thanks for the help nonetheless as it did help solve our problem. :D


All times are GMT -5. The time now is 11:13.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi