New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

aht20-sensor

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aht20-sensor

A Node.js I2C module for the Adafruit AHT20 Humidity/Temperature Sensor.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

aht20-sensor

A Node.js I2C module for the Adafruit AHT20 Humidity/Temperature Sensor.

Installation

npm install aht20-sensor

Example

const { default: AHT20 } = require('aht20-sensor');

AHT20.open().then(async (sensor) => {
    try {
        const temp = await sensor.temperature();
        const hum = await sensor.humidity();
        console.log(temp, hum);
    }
    catch(err) {
        console.error("Failed to get temperature or humidity data.");
    }
}).catch((err) => {
    console.error("Failed to open bus.");
});

Wiring

Wiring can be found here: https://cdn-learn.adafruit.com/downloads/pdf/adafruit-aht20.pdf

Keywords

AHT20

FAQs

Package last updated on 08 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts