Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for implementing the arduino pulseIn method and exposing that thru Firmata. Specifically needed for ultrasonic ranging sensors that use a pulse to measure distances. Polling the pin state over the network using a firmata client to take measurements is too noisy. The network latency is never going to be fast or stable enough to get any sort of accuracy for these timing-based sensors.
The time differential needed to compute measurements on these type of sensors, I believe, really needs to be done on the hardware itself. Network latency can add +-10 full milliseconds even under the best conditions. (Plus it would stink to have measurements change as a function of distance from wifi router.)
This code was taken from: @jgautier 's arduino fork,
Architectural approach from: @NeoPolus - pyFirmata#45
Relevant threads with gobot client: