An open API service indexing awesome lists of open source software.

https://github.com/niklauslee/lm35

Kaluma library for LM35 temperature sensor
https://github.com/niklauslee/lm35

kaluma lm35 sensor temperature

Last synced: 2 months ago
JSON representation

Kaluma library for LM35 temperature sensor

Awesome Lists containing this project

README

        

# 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](https://github.com/niklauslee/lm35/blob/main/images/wiring.jpg?raw=true)

# Install

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

# Usage

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

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

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

# API

## read(pin)

- **`pin`** `` Pin number supporting ADC.
- **Returns**: ``

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