View Single Post
  #3   Spotlight this post!  
Unread 15-01-2013, 01:54
slijin's Avatar
slijin slijin is offline
Pockets
AKA: Samuel Lijin
FRC #0694 (StuyPulse)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York City
Posts: 537
slijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to behold
Re: Speed Controllers are Confused

Quote:
Originally Posted by nighterfighter View Post
The fact that the EXACT same code is causing a problem is...weird.

Are you sure there aren't any minute changes? It could be an issue of the button press is being read inside a loop or something, making the value change/stay changed, whereas in the other version of your code it isn't.
Barring this problem, there is the remote possibility that the WPI libraries on the first computer may be corrupted or out of date (the latter of which is highly unlikely, as I've never seen an unstable WPI library), which means that when code is deployed to the robot, the commands you wrote using the WPI libraries produce different electric signals, resulting in this disparity.

Here's my reasoning (in the case of the former laptop): A solid red light on the Victor implies that the Victor is interpreting the command it's receiving as a -1. No light on the Victor implies that it is receiving a command very, very close to 0, but not close enough or far away enough to trigger a color in the LED. Rounding this signal, the Victor is seeing here a 0 command. Your code is supposed to be sending, respectively, a 0 and 1 command.

Therefore, your Victor is responding to a signal 1 below what the code you've written is intended to send. The libraries that translate the command in the code you write, however, have to do convert that command into a PWM duty cycle to command the Victor, and this conversion is the only point of error that comes to mind.

I can't imagine how anything would change electrically when you just change laptops, and if your code really does stay the same, then the WPI libraries are the only variable you have to deal with.
__________________

2010-12 CT Chairman's
2011 Galileo 5th seed
2010 NY Regional Winners