|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
Hey is there anyway to return the battery voltage to the user program, our team was noticing that we need to aim slightly differently in order to compensate for the drop in voltage caused from running our motors. So I was hoping there was someway to return the voltage and compensate for it in order to be more accurate any help on this would be awesome.
Thanks: 2130 Alpha+ |
|
#2
|
|||
|
|||
|
Re: Returning battery voltage into user program
uhmm in Java the battery voltage can be returned as a get method in the driverstation class
|
|
#3
|
|||
|
|||
|
Re: Returning battery voltage into user program
Yes however I was needing it in C... where is it under the java though? it might be under a similar file in C.
and It is thank you very much Last edited by zrem : 19-02-2012 at 17:18. |
|
#4
|
|||
|
|||
|
Re: Returning battery voltage into user program
|
|
#5
|
|||
|
|||
|
Re: Returning battery voltage into user program
Uhmm I think in Java if you import the DriverStation class or it might be in the DriverStationLCD class
|
|
#6
|
|||
|
|||
|
Re: Returning battery voltage into user program
There is a method for this in the Driver Station class.
This line code should do what you want I believe: Code:
float voltage; ... ... voltage = DriverStation::GetInstance()->GetBatteryVoltage(); |
|
#7
|
||||
|
||||
|
Re: Returning battery voltage into user program
Zem.. you may wish to consider / implement encoder feedback closed loop speed control on shooter motor (PID)
to automatically compensate for battery voltage droop and dynamic IR load drops from drive motors and apply full power after each shot to most quickly get back to regulated set speed needed for consistent shooting. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|