Open rwaldron opened 11 years ago
Indeed, thanks for making a note, this should definitely be included in the readme. We should really put forth an effort to get this landed in the StandardFirmata package.
@soundanalogous is working on this very task https://github.com/soundanalogous/AdvancedFirmata
:)
That's awesome, I love the idea of AdvancedFirmata!
I will add it to ConfigurableFirmata as another feature class rather than to AdvancedFirmata (I plan to deprecate AdvancedFirmata once ConfigurableFirmata gets into the Firmata master branch). It's easier to implement features with ConfigurableFirmata. I already have an issue open here. @jgautier was going to take a stab at it but I suspect he got busy. I'll see what I can do. The challenge with pulseIn is to make it non-blocking. The arduino pulseIn function actually waits for the full pulse to complete before continuing program execution so it will require a new version of pulseIn or if you tried to use pulseIn with other features you would get unexpected results due to the delay that pulseIn creates. I may not have time to get to it for a couple of weeks so if anyone else has time before then feel free to submit a pull request into the configurable branch of arduino/firmata.
For this to work: https://github.com/KevinGrandon/PinIO/blob/master/board.js#L69-L82
node-firmata includes an API, but StandardFirmata doesn't, so this is required: https://github.com/jgautier/arduino-1/tree/pulseIn (to be flashed to the board)