|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Bunch of Different Issues
Ok so I'm done posting a ganzillion different threads about different problems, so I'm just going to make one with everything together.
Our problems include but are not limited to: - spikes not working - unsure of how to use pressure switch - unsure if our gyro is programmed correctly - unsure if our potentiometer is programmed correctly - unsure if our Talon motor controller is programmed correctly - unsure if our solenoids are programmed correctly - unsure how to get vision into Netbeans - unsure how to test any of our programming now. If you have anything that might be useful, please just say it because my partner and are in desperate need right now. We are using RobotBuilder exported to Java. For Vision we have the tape detected in RoboRealm but we are willing to use another program if someone isn't used to RoboRealm. Thanks in advance. Last edited by TenaciousDrones : 27-02-2014 at 15:33. Reason: I forgot the "s" in threads and my partner wouldn't stop annoying me. |
|
#2
|
||||
|
||||
|
Re: Bunch of Different Issues
Quote:
Pressure switch - Create a DigitalInput object and get its input. True usually means pressure is not at 120PSI yet. Gyro - Are you creating a Gyro object and calling getAngle() from it? Do you have the correct port for the analog signal, and are you sure it is wired correctly? Potentiometer - Create an AnalogChannel object and get its voltage or average (depending on usage). Talon - Should just be a Talon object set using the set(double) method. Solenoid - Single action or dual action? Single is only one boolean setting its state, and dual has three positions (left, right, off) Vision - There are many options here - what do you need vision for? Testing - Do you have an extra cRIO available from a local team? There have been attempts at simulators, but I haven't found anything very good yet. |
|
#3
|
||||
|
||||
|
Re: Bunch of Different Issues
Spikes: yes
Pressure Switch: that's what i thought Gyro:yes; yes; pretty sure (see picture below) Potentiometer: yes (I think) (see photo below) Talon: Ok coolio Solenoid: single Vision: To detect the hot goal (the tape that flips) Testing: Not sure Last edited by TenaciousDrones : 28-02-2014 at 10:55. Reason: forgot to attach pictures |
|
#4
|
||||
|
||||
|
Re: Bunch of Different Issues
Make sure you have the spikes' pwm cables plugged into the relay port on the digital side car. Use the compressor class for controlling the compressor. It handles the spike relay and the pressure switch per regulation easily.
|
|
#5
|
||||
|
||||
|
Re: Bunch of Different Issues
yes they are plugged in to the relay section
|
|
#6
|
||||
|
||||
|
Re: Bunch of Different Issues
also here is our codes
|
|
#7
|
||||
|
||||
|
Re: Bunch of Different Issues
On the DSC there are LED's next to the relay outputs, two per output. They light up depending on what you set the relay to - Forwards/Backwards will light up one of the LED's but not the other, Off will turn them both off, and On will turn them both on. These relate to the state the Spike can take - Forwards/Backwards will give you a 12V difference over the outputs, allowing you to run a motor forwards or backwards. Off connects both outputs to ground, and On connects them both to +12V. As a result, if you set it to "On", an attached motor won't move, as you have the same voltage going into both inputs!
Next, check the Spike itself. When you set the relay output to Forward/Backward, the Spike LED should be Green/Red, respectively. If it stays orange, and you're sure only one of the LED's next to the relay output is lit, then there's something wrong with the PWM connection - make sure the wire isn't damaged and that it's inserted correctly into the Spike. If the LED on the spike is changing, you can confirm this with a multimeter across the output terminals, and then look at the wiring from there to your motor. Quote:
In Java, you don't have to actually do very much. Create a new Compressor object - the constructor takes the relay port for the compressor and the port for the digital input from the pressure switch. Then you just have to call Compressor.start() and let it run in the background - it takes care of everything for you! Quote:
Quote:
If you want someone to take a look at your code, I'm sure my team would be willing to help - we've been using Java since the current control system came out. Just send specific, well defined questions/code snippets to 2177 (at) therobettes.com |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|