Skip to content

Cannot start the firmata device because the port is 'busy' stack trace #57

Open
@minecraftswingman

Description

@minecraftswingman

i keep getting error this stack trace to be exact
java.io.IOException: Cannot start firmata device java.io.IOException: Cannot start firmata devi Caused by: jssc.SerialPortException: Port name - /dev/tty.usbmodem14501; Method name - openPort(); Exception type - Port busy.

heres my code
`
if (device == null) {
try {
device = new FirmataDevice(COM_PORT);
device.start();
device.ensureInitializationIsDone();

            //initialize pin (just like how you initialize in Arduino IDE)
            BUTTON_UP = device.getPin(2);
            BUTTON_RIGHT = device.getPin(3);
            BUTTON_DOWN = device.getPin(4);
            BUTTON_LEFT = device.getPin(5);
            BUTTON_E = device.getPin(6);
            BUTTON_F = device.getPin(7);
            Pin[] Buttonpins = {BUTTON_DOWN, BUTTON_LEFT, BUTTON_RIGHT, BUTTON_UP, BUTTON_E, BUTTON_F, JOYSTICK_BUTTON};
            for (Pin pin : Buttonpins){
                pin.setMode(Pin.Mode.INPUT);
            }


        } catch (IOException | InterruptedException e) {
            e.printStackTrace();
        }
    } 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions