The code in robot.java that turns the flashlight on and off doesn't match what was ran at WPI.
To turn the flashlight on, the value sent to the relay must be kForward not kOn.
KOn sends 12 VDC out on both the relay outputs (which yields a 0v differential). KForward outputs 12v on the positive relay channel and 0v on the negative relay channel.
The only reason the light briefly turns on sometimes is when the positive relay channel switches to 12v faster than the negative one. That means the opposite could happen as well (12v on the negative channel while there's 0v on the positive channel, which would be bad)
Don't know why this was changed since WPI but the code is wrong as is. Hopefully the regulator isn't blown.
The code in robot.java that turns the flashlight on and off doesn't match what was ran at WPI.
To turn the flashlight on, the value sent to the relay must be kForward not kOn. KOn sends 12 VDC out on both the relay outputs (which yields a 0v differential). KForward outputs 12v on the positive relay channel and 0v on the negative relay channel.
The only reason the light briefly turns on sometimes is when the positive relay channel switches to 12v faster than the negative one. That means the opposite could happen as well (12v on the negative channel while there's 0v on the positive channel, which would be bad)
Don't know why this was changed since WPI but the code is wrong as is. Hopefully the regulator isn't blown.