You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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 likeboard.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 usingboard.transport.drain
will ensure that whatever I just queued up will be sent before I proceed?The text was updated successfully, but these errors were encountered: