View Single Post
  #5   Spotlight this post!  
Unread 25-11-2012, 16:44
Skyehawk's Avatar
Skyehawk Skyehawk is offline
Nuts N' Bolts
AKA: Skye Leake
FRC #0876 (Thunder Robotics)
Team Role: Mentor
 
Join Date: Nov 2012
Rookie Year: 2011
Location: Northwood, ND
Posts: 204
Skyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to all
Re: Enhanced I/O through Cypress

I managed to test the program. I got this in the run box:
Code:
[cRIO] edu.wpi.first.wpilibj.DriverStationEnhancedIO$EnhancedIOException: Enhanced IO Missing
[cRIO]     at edu.wpi.first.wpilibj.DriverStationEnhancedIO.getDigitals(DriverStationEnhancedIO.java:629)
[cRIO]     at edu.wpi.first.wpilibj.DriverStationEnhancedIO.getDigital(DriverStationEnhancedIO.java:619)
[cRIO]     at edu.wpi.first.wpilibj.templates.RobotClass.teleopPeriodic(RobotClass.java:70)
[cRIO]     at edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:145)
[cRIO]     at edu.wpi.first.wpilibj.RobotBase.startApp(RobotBase.java:156)
[cRIO]     in virtual method #10 of javax.microedition.midlet.MIDlet(bci=17)
[cRIO]     at javax.microedition.midlet.MIDletTunnelImpl.callStartApp(64)
[cRIO]     at com.sun.squawk.imp.MIDletMainWrapper.main(110)
[cRIO]     in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO]     at com.sun.squawk.Isolate.run(1506)
[cRIO]     at java.lang.Thread.run(231)
[cRIO]     in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO]     in static method #3 of com.sun.squawk.VM(bci=6)
[cRIO] Robot Drive... Output not updated often enough.
This is a single loop of the teleop portion of the code. It says near the top that it can not find the Enhanced I/O. Is this what was being refered to previously? I also made a few changes to my code:
Code:
         try {
             if (dseio.getDigital(1)) {
                 feed.setDirection(Relay.Direction.kForward);
             } else if (dseio.getDigital(3)) {
                 feed.setDirection(Relay.Direction.kReverse);
             }
         } catch (EnhancedIOException ex) {
             feed.set(Relay.Value.kOff);
             ex.printStackTrace();
         }
I changed the .getButton to .getDigital based on how things are labeled on the DS.
I reimaged the cRIO (to change IP) and my relay was not responding to my command from the joystick (it worked before I reimaged it). I added it to autonomous and the relay worked. (the joystick was responding in the dionostics tab so I have no Idea what caused it to quit working, I will restore the cRIO to the IP that it had previously) Once I get the relay going again on user command I will have a definate answer on whether or not this code worked, but in the meantime feel free to critique.
Reply With Quote