esp32-ds18b20
ESP32-compatible C library for Maxim Integrated DS18B20 Programmable Resolution 1-Wire Digital Thermometer.
Functions
ds18b20_wrapper.h File Reference

definitions for wrapper component to help setup and interface with temp sensor More...

Go to the source code of this file.

Functions

int ds18b20_wrapped_init (void)
 init the sensor intitialises the onewire bus and finds and intialises ds18b20 sensors along the pin More...
 
void ds18b20_wrapped_deinit (void)
 deinit the sensor cleans up and frees all of the devices and the onewire bus
 
void ds18b20_wrapped_read (void)
 print the temps runs conversion on all the owb devices, waits for the conversion and then prints out the results when it receives them
 
void ds18b20_wrapped_capture (float *results, int size)
 capture temps to results this function runs conversion on all the owb devices, waits for conversion to finish and then reads the temperatures into the provided results array More...
 

Detailed Description

definitions for wrapper component to help setup and interface with temp sensor

Function Documentation

◆ ds18b20_wrapped_init()

int ds18b20_wrapped_init ( void  )

init the sensor intitialises the onewire bus and finds and intialises ds18b20 sensors along the pin

Returns
the number of devices it found on the bus as an int

◆ ds18b20_wrapped_capture()

void ds18b20_wrapped_capture ( float *  results,
int  size 
)

capture temps to results this function runs conversion on all the owb devices, waits for conversion to finish and then reads the temperatures into the provided results array

Parameters
[in]resultsa pointer to the array to capture results to
[out]resultsthe array pointer that has been populated with data
sizethe number of devices found and the size of the results array