Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/igorkulman/rpi-temp-module
Node module for fetching data from the DS18B20 temperature sensor on Raspberry Pi
https://github.com/igorkulman/rpi-temp-module
Last synced: 6 days ago
JSON representation
Node module for fetching data from the DS18B20 temperature sensor on Raspberry Pi
- Host: GitHub
- URL: https://github.com/igorkulman/rpi-temp-module
- Owner: igorkulman
- License: mit
- Created: 2015-06-17T12:30:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-09T09:07:11.000Z (about 7 years ago)
- Last Synced: 2023-03-22T16:50:21.878Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
rpi-temp-module
=========Node module for fetching data from the DS18B20 temperature sensor on Raspberry Pi. For real world usage see the [Raspberry Pi thermometer project](https://github.com/igorkulman/rpi-thermometer).
## Raspberry Pi setup
First, load the drivers
```bash
sudo modprobe w1-gpio
sudo modprobe w1-therm
```then determine the device id of your sensor (28-000004e23e98 in my case)
```bash
ls /sys/bus/w1/devices/
```You will need to provide the device id as a parameter when using the module.
## Installation
```bash
npm install rpi-temp-module --save
```## Usage
```javascript
var rpiTemp = require('rpi-temp-module');rpiTemp.getTemperature("28-000004e23e98", funciton(value) {
console.log("Temperature: "+value+"C");
});
```## Tests
```bash
npm test
```