Arduino-OWI
One-Wire Interface (OWI) library for Arduino
DS18B20.ino File Reference
#include "GPIO.h"
#include "OWI.h"
#include "Slave/OWI.h"
Include dependency graph for DS18B20.ino:

Go to the source code of this file.

Classes

struct  scratchpad_t
 

Enumerations

enum  {
  CONVERT_T = 0x44, READ_SCRATCHPAD = 0xBE, WRITE_SCRATCHPAD = 0x4E, COPY_SCRATCHPAD = 0x48,
  RECALL_E = 0xB8, READ_POWER_SUPPLY = 0xB4
}
 

Functions

void setup ()
 
void loop ()
 

Variables

static const uint8_t FAMILY_CODE = 0x28
 
Slave::OWI< BOARD::D7 > owi (FAMILY_CODE)
 
scratchpad_t scratchpad
 
const int pin = A0
 
GPIO< BOARD::D13 > led
 

Enumeration Type Documentation

anonymous enum

DS18B20 Function Commands.

Enumerator
CONVERT_T 

Initiate temperature conversion.

READ_SCRATCHPAD 

Read scratchpad including crc byte.

WRITE_SCRATCHPAD 

Write data to scratchpad.

COPY_SCRATCHPAD 

Copy configuration register to EEPROM.

RECALL_E 

Recall configuration data from EEPROM.

READ_POWER_SUPPLY 

Signal power supply mode.

Definition at line 11 of file DS18B20.ino.

Function Documentation

void loop ( )

Definition at line 56 of file DS18B20.ino.

void setup ( )

Definition at line 49 of file DS18B20.ino.

Variable Documentation

const uint8_t FAMILY_CODE = 0x28
static

DS18B20 family code.

Definition at line 6 of file DS18B20.ino.

GPIO<BOARD::D13> led

Definition at line 47 of file DS18B20.ino.

Slave::OWI<BOARD::D7> owi(FAMILY_CODE)
const int pin = A0

Definition at line 44 of file DS18B20.ino.

scratchpad_t scratchpad
Initial value:
= {
0x0550,
75,
70,
0x3f,
{ 0, 0, 0 }
}

Definition at line 35 of file DS18B20.ino.