odroid-temp
Version:
Read the temp sensor on Odroid
32 lines (23 loc) • 714 B
Markdown
odroid-temp
===========
Use Odroid's temp sensor with NodeJS
A single small module to easily read the temperature sensor on Odroid
## Installation
NodeJS versions 10.12.x are currently supported and tested.
### Install from NPM (Easy way)
$ npm install odroid-temp
## API
* `var temp = new Temp();` Create a new instance of odroid-temp.
* `temp.read` to read the temperature
```javascript
temp.read(function(err, value){
console.log("temp.read", err, value);
});
```
* `temp.on` to catch event from temperature sensor
```javascript
temp.on('change', function(value){
console.log("Temperature %d °C", value);
});
```
Ref : http://odroid.us/mediawiki/index.php?title=Temperature_Checking