KevinGrandon / PinIO

Arduino pin management in Javascript
8 stars 1 forks source link

pulseIn requires a special version of StandardFirmata #1

Open rwaldron opened 11 years ago

rwaldron commented 11 years ago

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)

KevinGrandon commented 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.

rwaldron commented 11 years ago

@soundanalogous is working on this very task https://github.com/soundanalogous/AdvancedFirmata

:)

KevinGrandon commented 11 years ago

That's awesome, I love the idea of AdvancedFirmata!

soundanalogous commented 11 years ago

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.