Replies: 1 comment
-
The issue with pymata4 was that the digital read command returned only the last value reported. Many state transitions may have occurred between calls to digital read, and all of them were missed by the application. Also, polling is not very CPU efficient and can slow an application down. You may wish to set a differential value for analog inputs. Unless you need a very high resolution, setting a differential value of about five usually quiets things down. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed that we still have the digital_write function but not digital_read. I understand based on the existing example that we just need to set_pin_mode_digital_input which will register callbacks. This approach, however, requires that I create a buffer to store all updates to a pin. This approach also forces me to implement software debounce for reading analog signals. (Separate issue but I also notice lots of callbacks on the ArduinoMega that isn't reflected on a scope (probably happens too fast but telemetrix triggers the callback).
Why such an approach? It would be great to have the option to directly read from a pin with digital_read as needed.
Beta Was this translation helpful? Give feedback.
All reactions