Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

DFR0198 Datasheet(PDF) 5 Page - DFROBOT

Part # DFR0198
Description  DS18B20 ArduinoTemperature sensor
PDF  6 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  DFROBOT [DFROBOT]
Direct Link  https://www.dfrobot.com/
Logo DFROBOT - DFROBOT

DFR0198 Datasheet(HTML) 5 Page - DFROBOT

  DFR0198 Datasheet HTML 1Page - DFROBOT DFR0198 Datasheet HTML 2Page - DFROBOT DFR0198 Datasheet HTML 3Page - DFROBOT DFR0198 Datasheet HTML 4Page - DFROBOT DFR0198 Datasheet HTML 5Page - DFROBOT DFR0198 Datasheet HTML 6Page - DFROBOT  
Zoom Inzoom in Zoom Outzoom out
 5 / 6 page
background image
#include <OneWire.h>
int DS18S20_Pin = 2; //DS18S20 Signal pin on digital 2
//Temperature chip i/o
OneWire ds(DS18S20_Pin); // on digital pin 2
void setup(void) {
Serial.begin(9600);
}
void loop(void) {
float temperature = getTemp();
Serial.println(temperature);
delay(100); //just here to slow down the output so it is easier to read
}
float getTemp(){
//returns the temperature from one DS18S20 in DEG Celsius
byte data[12];
byte addr[8];
if ( !ds.search(addr)) {
//no more sensors on chain, reset search
ds.reset_search();
return -1000;
}
if ( OneWire::crc8( addr, 7) != addr[7]) {
Serial.println("CRC is not valid!");
return -1000;
}
7/7/24, 4:55 PM
Waterproof_DS18B20_Digital_Temperature_Sensor__SKU_DFR0198_-DFRobot
https://wiki.dfrobot.com/Waterproof_DS18B20_Digital_Temperature_Sensor__SKU_DFR0198_#target_4
5/6



Html Pages

1 2 3 4 5 6


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com