Go Back   VEX Forum > Community > Technical Discussion

Technical Discussion Open Technical Discussion of the VEX Robotics System.

Reply
 
Thread Tools
  #1  
Old 04-03-2012, 10:52 AM
Freepro Freepro is offline
Junior Member
VEX # 4221A
 
Join Date: Mar 2012
Location: In my dreams
Posts: 4
Power Expander

On my team's robot, we are trying to read the voltage of the battery of the power expander. To do that, I have to read the value of status wire that connects to the analog/digital port from the power expander. How would you do that in easy c?
Reply With Quote
  #2  
Old 04-03-2012, 02:00 PM
kingofl337's Avatar
kingofl337 kingofl337 is offline
Senior Member
 
Join Date: Jul 2006
Location: Manchester, NH
Posts: 757
Re: Power Expander

You just read the analong voltage from the power exapander and some math to scale the input upto battery levels. Here is the wiki for the math. If you use their Cortex example you need to use Analog Input High Resolution.

http://www.vexforum.com/wiki/index.php/Power_Expander
__________________
Intelitek Support
PH: 800 221 2763
E-Mail: Support@intelitek.com

Current Versions of easyC: V2-PIC : 2.9.4.0 , PRO-PIC : 3.1.4.0 , V4-Cortex : 4.2.1.7

Like Intelitek on Facebook
Reply With Quote
  #3  
Old 04-03-2012, 02:21 PM
Freepro Freepro is offline
Junior Member
VEX # 4221A
 
Join Date: Mar 2012
Location: In my dreams
Posts: 4
Re: Power Expander

How would you read the analog voltage from the power expander.
Reply With Quote
  #4  
Old 04-03-2012, 02:50 PM
kingofl337's Avatar
kingofl337 kingofl337 is offline
Senior Member
 
Join Date: Jul 2006
Location: Manchester, NH
Posts: 757
Re: Power Expander

Wire it as shown in the Wiki and then Call "Get Analog Input HR". Then look at the value returned.

I'm waiting to hear back from Vex on the output in relationship to the battery voltage. I've been told there are two models of expander and the values are diffrent between them. But, for now if you want to cheat, you could take a battery fully charged and one fully drained, get the two values and decide from there what to do with an IF statement.
__________________
Intelitek Support
PH: 800 221 2763
E-Mail: Support@intelitek.com

Current Versions of easyC: V2-PIC : 2.9.4.0 , PRO-PIC : 3.1.4.0 , V4-Cortex : 4.2.1.7

Like Intelitek on Facebook

Last edited by kingofl337; 04-03-2012 at 03:05 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 09:47 PM.


VEX and VEX Robotics are trademarks or service marks of Innovation First International, Inc.
Copyright © 2002-2013. All Rights Reserved. VEX Robotics, Inc. is a subsidiary of Innovation First International, Inc.
All other product names/marks of others are the property of their respective owners.