Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promise of completion #137

Open
troywweber7 opened this issue Oct 21, 2016 · 2 comments
Open

Promise of completion #137

troywweber7 opened this issue Oct 21, 2016 · 2 comments

Comments

@troywweber7
Copy link

I have poured over the firmata.js file extensively. For some of the functions available on a board there is a callback that ensures the data has been sent because a response comes in. For other functions, you just send it and hope it happens. What is the preferred way to ensure a function like board.setSamplingInterval has actually completed? There is no callback function or response from the Arduino Board associated with this function.

My thought for how to resolve this: maybe I should call a dummy queryPinState function right after and use its callback? Or maybe using board.transport.drain will ensure that whatever I just queued up will be sent before I proceed?

@soundanalogous
Copy link
Member

There is no way to do this because StandardFirmata running on the Arduino does not implement an RPC protocol. Many commands are only one direction.

@soundanalogous
Copy link
Member

Also there is a proposal to add the ability to query the sampling interval: firmata/protocol#34.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants