Skip to content

niklauslee/lm35

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LM35

Kaluma library for LM35 temperature sensor.

Wiring

Here is a wiring example for ADC0.

Raspberry Pi Pico LM35
VBUS (5V) VCC
GND GND
GP26 (ADC0) OUT

wiring

Install

npm install https://github.com/niklauslee/lm35

Usage

Here is an example code for reading temperature (in celsius) from LM35.

const lm35 = require('lm35');
const pin = 26; // ADC0

setInterval(() => {
  console.log(`temperature (in celsius): ${lm35.read(pin)}`);
}, 1000);

API

read(pin)

  • pin <number> Pin number supporting ADC.
  • Returns: <number>

Reads voltage from the pin and returns temperature value in celsius.

About

Kaluma library for LM35 temperature sensor

Topics

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors