GithubHelp home page GithubHelp logo

patrickbaus / arduino-sht2x Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 59 KB

An Arduino compatible library for the Sensirion SHT2x, Silicon Labs Si702x and Measurement Specialties HTU21 temperature sensors

License: GNU General Public License v3.0

C++ 100.00%

arduino-sht2x's Introduction

Sensirion SHT2x Arduino Library

Note: These devices are all NRD except for the TE parts.

This repository contains an Arduino library for the following Sensirion devices:

The library uses I²C transactions and allows to select the I²C controller if there is more than one.

Usage

#include <Wire.h>   // #include <i2c_t3.h> on the Teensy platform.
#include "src/SHT2x.h"

SHT2x sensor(Wire);
//HTU2x sensor(Wire);
//Si702x sensor(Wire);

void setup() {
  Wire.begin();
  Serial.begin(115200);
}

void loop() {
  // The call to readTemp() will automatically block for the time the measurement takes to complete
  Serial.print(sensor.readTemp());  // Read the temperarture as a float in °C
  Serial.println(" °C");
  Serial.print(sensor.readHumdity());  // Read the humidity as a float in %rH
  Serial.println(" %rH");
  delay(2000);
}

Installation

Currently the library does not support the Arduino library manager, so it is highly recommended to copy the full library to a subfolder called

src/

within your Arduino project.

arduino-sht2x's People

Contributors

patrickbaus avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.