kurbatov / firmata4j

Firmata client written in Java.
MIT License
87 stars 45 forks source link

Incorrect values reported when using PULLUP mode #47

Open dougmeredith opened 3 years ago

dougmeredith commented 3 years ago

When using PULLUP mode for pins, they don’t always report the right value. This occurs with a genuine Uno, a clone Uno, and a clone Mega. It occurs on Windows, CentOS and on the Raspberry Pi.

I am running 2.3.8, although with the JSerialComm transport pulled from Git. I’m using Java 11. The Arduinos are running the latest version of StandardFirmata.

I tried the same test using a Python Firmata library, and didn’t have the problem, so I believe this is an issue with Firmata4J, rather than with the firmware. This is easy to reproduce, as described below.

Basics

Test procedure

Test 1

Test 2

Test 3

kurbatov commented 3 years ago

Hi @dougmeredith, Thank you for reporting that. I will take a look at the issue.

dougmeredith commented 3 years ago

Thanks! Just let me know if you need any more information, or if there is anything that you'd like for me to test.

oliviercoma commented 2 years ago

I think it might be the same root cause as #55