Skip to content

A simple event based NodeJS module for reading temperature using a DS18B20 on a Raspberry PI.

License

Notifications You must be signed in to change notification settings

smnplicity/node-rpi-gpio-ds18b20

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@node-rpi-gpio/ds18b20

A simple event based NodeJS module for reading temperature using a DS18B20 on a Raspberry PI.

Installation

npm i @node-rpi-gpio/ds18b20

Usage

Subscribe to temperature change events

const ds18b20 = new DS18B20({ deviceId: "28-3c46e381ef0a", units: "C", precision: 1 })
  .on("error", (err: string | Error) => {
    // Log or display an error.
  })
  .on("change", (changedValue: number) => {
    
  })
  .connect();

About

A simple event based NodeJS module for reading temperature using a DS18B20 on a Raspberry PI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published