Giter VIP home page Giter VIP logo

senz008-temperature-sensor's Introduction

SENZ008-Temperature-Sensor

Translation

For English, please click here.

For Chinese, please click here.

Introduction

The SENZ008 Temperature Sensor is a very small thermometer which can be easily hooked into the Arduino MCU through any digital input! It requires very little in the way of additional support, a couple of resistors and some hookup cables and you're set to go.

Specification

  • Supply Voltage: 3.3V ~ 5 V
  • Temperature range :-55 ~ +125℃ ( -67 ~ +257℉ )
  • Error of ± 0.5℃ ( among -10℃ to +85℃ ), ±2℃ ( others )
  • Resolution : ±0.5℃
  • Size: 2.1cm x 1.0cm

Tutorial

Pin Definition

Sensor Pin Ardunio Pin Function Description
VCC 3.3V~5V Power
GND GND
DO Digital pin Digital Output

Connecting Diagram

Sample Code

#include <DallasTemperature.h>

DallasTemperature tempSensor;

void setup(void) {
  Serial.begin(9600);
  tempSensor.begin(3); // Connect DS18B20 to Digital Pin 3
}

void loop(void) {
    // Check if the sensor is working correctly
    switch(tempSensor.isValid())
    {
        case 1:
            Serial.println("Invalid CRC");
            tempSensor.reset(); // Reset Sensor
            return;
        case 2:
            Serial.println("Not a valid device");
            tempSensor.reset(); // Reset Sensor
            return;
    }

  // Read Temperature from DS18B20
  Serial.print(tempSensor.getTemperature());
  Serial.print("C");
  Serial.println();
}

senz008-temperature-sensor's People

Contributors

njustcjj avatar

Watchers

James Cloos 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.