I’m Just Trying to get a Hello World program to work over Serial communications.
I have yet to find the smoking gun to answer how to get the RS-232 port working. As soon as I put this line into the robot program stops working. This IS the only line of code currently entered.
SerialPort camdata = new SerialPort(115200, SerialPort.Port.kOnboard);
Console output:
ERROR: Could not instantiate robot org.usfirst.frc.team3244.robot.Robot!
Error at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:218): ERROR Unhandled exception instantiating robot org.usfirst.frc.team3244.robot.Robot java.lang.RuntimeException: Code: -1073807246. HAL - VISA: Resource Busy at [edu.wpi.first.wpilibj.hal.SerialPortJNI.serialInitializePort(Native Method), edu.wpi.first.wpilibj.SerialPort.<init>(SerialPort.java:112), edu.wpi.first.wpilibj.SerialPort.<init>(SerialPort.java:160), org.usfirst.frc.team3244.robot.Robot.<init>(Robot.java:12), sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method), sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62), sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45), java.lang.reflect.Constructor.newInstance(Constructor.java:408), java.lang.Class.newInstance(Class.java:433), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:216)]
ERROR: Could not instantiate robot org.usfirst.frc.team3244.robot.Robot!
ERROR 1 ERROR Unhandled exception instantiating robot org.usfirst.frc.team3244.robot.Robot java.lang.RuntimeException: Code: -1073807246. HAL - VISA: Resource Busy at [edu.wpi.first.wpilibj.hal.SerialPortJNI.serialInitializePort(Native Method), edu.wpi.first.wpilibj.SerialPort.<init>(SerialPort.java:112), edu.wpi.first.wpilibj.SerialPort.<init>(SerialPort.java:160), org.usfirst.frc.team3244.robot.Robot.<init>(Robot.java:12), sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method), sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62), sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45), java.lang.reflect.Constructor.newInstance(Constructor.java:408), java.lang.Class.newInstance(Class.java:433), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:216)] edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:218)