45 if (bits < 9) bits = 9;
else if (bits > 12) bits = 12;
62 if (!owi->
reset())
return (
false);
65 if (resolution == 0)
return (
true);
66 if (resolution < 9) resolution = 9;
67 else if (resolution > 12) resolution = 12;
134 uint16_t fraction = (625 * (temp & 0xf)) / 100;
135 int16_t integer = (temp >> 4);
136 outs << integer <<
'.';
137 if (fraction < 10) outs <<
'0';
int16_t temperature() const
scratchpad_t m_scratchpad
static void print(IOStream &outs, int16_t temp)
friend IOStream & operator<<(IOStream &outs, OWI &owi)
void write(uint8_t value, uint8_t bits=CHARBITS, bool power=false)
static const uint8_t CONFIG_MAX
bool read_scratchpad(bool flag=true)
bool connect(uint8_t index)
void(* delay)(uint32_t ms)
uint8_t resolution() const
int8_t high_trigger
High temperature trigger.
uint8_t configuration
Configuration; resolution, alarm.
static const uint16_t MIN_COPY_PULLUP
bool connect(uint8_t family, uint8_t index)
uint8_t read(uint8_t bits=CHARBITS)
static const uint16_t MAX_CONVERSION_TIME