|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Problem regarding code and spikes.
I'm not entirely sure if it's a code problem or an electrical problem, but I'm led to believe it's more of a code problem. We're running two flippers off of relays as opposed to the solenoid breakout, and we're trying to program them via button presses. Pressing the trigger powers both flickers, while button 4 powers the third spike which is powering the left flicker, and button 5 powers the second spike which is powering the right flicker.
if (stick1.getTrigger() == true) { RightFlicker.set(Relay.Value.kForward); LeftFlicker.set(Relay.Value.kForward); } else { RightFlicker.set(Relay.Value.kReverse); LeftFlicker.set(Relay.Value.kReverse); } if (stick1.getRawButton(4)) { LeftFlicker.set(Relay.Value.kForward); } else { LeftFlicker.set(Relay.Value.kReverse); } if (stick1.getRawButton(5)) { RightFlicker.set(Relay.Value.kForward); } else { RightFlicker.set(Relay.Value.kReverse); } The flickers are initialized correctly, and are both set to reverse in the constructor. As I said, it may be either a programming or an electrical problem, so it may or may not be the code. Can anyone see any potential problems with that code that will make the flickers not work at all? |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Spikes and jaguars in labview. | Shadow_Cat | NI LabVIEW | 0 | 10-01-2009 20:17 |
| Lights on Spikes and Vics | merybar | Electrical | 4 | 25-01-2008 21:18 |
| Motors and Victors/Spikes | anna~marie | Electrical | 4 | 01-10-2004 21:58 |
| spikes and victors | VinceT | Electrical | 2 | 14-01-2004 01:36 |
| extra victors and spikes allowed? | gail | OCCRA | 12 | 13-11-2002 14:17 |