Skip to content

Toit driver for the SHT31-D Digital Temperature & Humidity Sensor

License

Notifications You must be signed in to change notification settings

harshkc03/sht31-d_driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SHT31-D

Toit driver for the Adafruit's SHT31-D Digital Temperature and Humidity Sensor

Installation

  1. toit pkg sync

  2. toit pkg install github.com/harshkc03/sht31-d_driver

Usage

import i2c
import gpio
import sht31_d_driver.sht31

main:
    bus := i2c.Bus
      --sda=gpio.Pin 21
      --scl=gpio.Pin 22

    device := bus.device sht31.I2C_ADDRESS

    driver := sht31.Driver device

    print "$driver.read_temperature C"
    print "$driver.read_humidity %"

About

Toit driver for the SHT31-D Digital Temperature & Humidity Sensor

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published