1

Since today, no matter what program that uses sensors I try to run on my EV3 I get the following error:

lejos.hardware.DeviceException: unable to open port
    at lejos.internal.ev3.EV3Port.open(EV3Port.java:75)
    at lejos.hardware.sensor.AnalogSensor.<init>(AnalogSensor.java:24)
    at lejos.hardware.sensor.AnalogSensor.<init>(AnalogSensor.java:35)
    at lejos.hardware.sensor.EV3TouchSensor.<init>(EV3TouchSensor.java:61)
    at ia.Sensor.<init>(Sensor.java:19)
    at ia.Robot.<init>(Robot.java:16)
    at ia.Jeu.main(Jeu.java:16)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at lejos.internal.ev3.EV3Wrapper.invokeClass(EV3Wrapper.java:62)
    at lejos.internal.ev3.EV3Wrapper.main(EV3Wrapper.java:46)

I've checked the ports, the cables and my ultrasonic sensor (which seems to be where the problem is) but nothing. I get the same error when I try closing the sensor.

3
  • 4
    This is a stack trace. What is the actual error? Are you using LeJOS firmware or ev3dev-lang-java? Dec 1, 2023 at 0:18
  • 1
    @DavidLechner Sorry, I didn't paste it correctly, it should appear now. I'm using ev3dev-lang-java.
    – celia
    Dec 1, 2023 at 12:25
  • Do the sensors show up in the in the "Device Browser" on the EV3? Dec 2, 2023 at 16:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.