Go to Post FIRST truly isnt about building robots, but allowing yourself to reach higher and farther than you ever could. - Brandon Holley [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-03-2015, 22:36
techplex's Avatar
techplex techplex is offline
Blake B
AKA: Blake
FRC #4909 (The Bionics)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2007
Location: Massachusetts
Posts: 89
techplex is a jewel in the roughtechplex is a jewel in the roughtechplex is a jewel in the roughtechplex is a jewel in the rough
Trouble with serial port: HAL - VISA: Resource Not Found

Greetings, we hare having trouble using our NavX MXP via its USB connection.

We have our NavX connected using a USB cable as described:
https://code.google.com/p/navxmxp/wi..._via_USB_cable

When running the sample code https://code.google.com/p/navxmxp/so...eRobotExample/

We get the following exception:

Code:
ERROR Unhandled exception: java.lang.NullPointerException at [
org.usfirst.frc.team2465.robot.Robot.operatorControl(Robot.java:93), 
edu.wpi.first.wpilibj.SampleRobot.startCompetition(SampleRobot.java:148), 
edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:234)]
The error appears to be referring to the first use of the imu object.
Code:
boolean is_calibrating = imu.isCalibrating();
Further investigation reveals that the SerialPort may be the culprit.
We moved the following line of code into the robotInit method yields a more descriptive error:

(Robot.java:81)
Code:
SerialPort my_serial_port = new SerialPort(57600,SerialPort.Port.kUSB);
Code:
ERROR Unhandled exception: java.lang.RuntimeException:  Code: -1073807343. HAL - VISA: Resource Not Found at [
edu.wpi.first.wpilibj.hal.HALUtil.checkStatus(HALUtil.java:48), 
edu.wpi.first.wpilibj.SerialPort.<init>(SerialPort.java:198), 
edu.wpi.first.wpilibj.SerialPort.<init>(SerialPort.java:251), 
org.usfirst.frc.team2465.robot.Robot.robotInit(Robot.java:81), 
edu.wpi.first.wpilibj.SampleRobot.startCompetition(SampleRobot.java:121), 
edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:234)]
Any Ideas?
__________________
Blake
Electrical, Programming and Design

Creator FRC Q&A 2017
Mass FRC Team 4909: The Bionics
Maine FRC Team 5122: The RobOTies (2014-2015)
Maine FRC Team 2648: Infinite Loop (2008-2011)
Reply With Quote
  #2   Spotlight this post!  
Unread 18-03-2015, 15:40
slibert slibert is online now
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 343
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: Trouble with serial port: HAL - VISA: Resource Not Found

If you are using the USB serial port, make sure that the RoboRio is actually recognizing the port, by using the web dashboard. There's more info about how to ensure the binding is working correctly on the nav6 Troubleshooting page.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:27.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi