Hardware Reference
In-Depth Information
Discussion
The SensorTag can do much more than read temperatures, but we've left out many of those
details to make the code more understandable. npm's sensortag page documents how to ac-
cess the other sensors. The SensorTag node module has a nice example ( test.js ) that shows
how to read all the sensors; in fact, the example in Example 2-15 is based on it. Here's
where to find test.js :
bone# cd /usr/local/lib/node_modules/sensortag
bone# less test.js
Here, you see examples of how to read all the sensors. Look in index.js (in the same direct-
ory) to see all the methods that are defined.
Search WWH ::




Custom Search