View Single Post
  #10   Spotlight this post!  
Unread 14-10-2007, 00:07
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Project Questions about Programming and Electrical

Well, I tried your code and same thing... I then defined battery_voltage in user_routines_fast and it's now updating, but the values are still in the 15 and 16000 range. I totally took out all the multiplication and stuff to get the normal volts and just created values using that equation so now I'm doing stuff like:
Code:
if (battery_voltage < 361)
{
relay02_fwd =  1 (<- this may be wrong, I'm writing this from memory)
}
The problem still remains: Why is my battery voltage appearing so high (like 600 volts)? I can't really see any relation. I may end up just making my own equation tomorrow or something that will allow me to get the voltage correct. Well, now I'm off to bed.

Edit: Just thought of another problem. My charger should stop charging when the value is greater than like 370 or something, but even though it's 16000, the charger remains on. I can connect the charger to a switch with the software and it works, so I'm probably screwing something up with the programming.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364