Hardware Reference
In-Depth Information
x.value = 1
x.err = undefined
x.value = 0
x.err = undefined
x.value = 1
x.err = undefined
^C
This process will work for any script in this topic.
NOTE
In this example, I've called b.pinMode() asynchronously and performed the
b.attachInterrupt() call within the callback function. There are cases where
BoneScript version 0.2.4 might not completely finish setting up a pin's mode when called
synchronously. That might result in needing to run a program twice to overcome the error.
Using asynchronous calls is the preferred strategy to avoid this issue.
Search WWH ::




Custom Search