firmata4j icon indicating copy to clipboard operation
firmata4j copied to clipboard

Can't connect correctly to Uno

Open balage1551 opened this issue 3 years ago • 1 comments

I've installed StandardFirmata on my Uno R3. I also followed the temporal hack in #48 to avoid crash. Now I try to connect to the device:

        val device: IODevice = FirmataDevice(JSerialCommTransport("COM3")) // using the name of a port
        device.start() // initiate communication to the device
        device.ensureInitializationIsDone() // wait for initialization is done
        device.pins.forEach { p ->
            println(""+p.index +" -> "+p.supportedModes)
        }
        device.stop() // stop communication to the device

But the ensureInitializationIsDone function throws time out exception. Also (though I think it is a consequence of the previous error), listing the pins returns empty set.

Is there any step I missed?

balage1551 avatar Jun 09 '21 10:06 balage1551

Hi Balázs,

The only advice for a quick solution I have is try and see if code from this branch works for you: https://github.com/kurbatov/firmata4j/tree/fix/37-digital-pin-value-message I didn't have a chance to test it by myself (and that's what holds new release) and it may turn out to be broken.

If it doesn't work for you, some in-depth debugging of your setup is needed. Please, try to identify which initialization step hangs.

kurbatov avatar Jun 10 '21 07:06 kurbatov