Skip to content

Commit

Permalink
More work on README
Browse files Browse the repository at this point in the history
  • Loading branch information
gfvalvo committed Jan 6, 2018
1 parent 6cc72d4 commit c82cd3d
Showing 1 changed file with 93 additions and 2 deletions.
95 changes: 93 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The provided example will locate all DS18B20-type devices on the OneWire bus and
It will then initiate a temperature measurement on all devices once per second. While the conversion is in process,
the main loop() function will continue to execute (non-blocking) while polling for completion. Once finished, the
measured temperatures are read and reported on the Serial Monitor along with conversion time and how many
times the loop() executed while the measurement was in process.
times the loop() function executed while the measurement was in process.

## Methods:

Expand All @@ -47,7 +47,6 @@ Returns:
Number of temp sensor devices found on OneWire bus (numTempSensor). Even if other OneWire
devices are found on the bus, The DS18xx-type sensors will be indexed by a tempSensorIndex
value between 0 and numTempSensor-1.


### startConvertion - Start temp measurment processos on all sensors
bool startConvertion();
Expand All @@ -71,5 +70,97 @@ Returns:

false if measurement already in progress, true otherwise

### Get the most recent temperature reading in raw device units:
int16_t getLatestTempRaw(uint8_t tempSensorIndex)

Arguments:

tempSensorIndex - Sensor number: 0 to numTempSensor-1

Returns:

Raw temperature reading from selected sensor (1/16 degC steps for DS18B20)

### Get the most recent temperature reading in degrees C:
float getLatestTempC(uint8_t tempSensorIndex)

Arguments:

tempSensorIndex - Sensor number: 0 to numTempSensor-1

Returns:

Temperature reading from selected sensor scaled to degress C

### Get the most recent temperature reading in degrees F:
float getLatestTempC(uint8_t tempSensorIndex)

Arguments:

tempSensorIndex - Sensor number: 0 to numTempSensor-1

Returns:

Temperature reading from selected sensor scaled to degress F

### Check if all temperature conversions have completed
boolean isConversionDone()

Arguments:

None

Returns:

true if measurements have completed, false otherwise

### Get OneWire address for a device:
void getAddressFromTempSensorIndex(DeviceAddress addr, uint8_t tempSensorIndex)

Arguments:

addr - buffer to receive DeviceAddress (see definition of DeviceAddress in DallasTemperature.h)
tempSensorIndex - Sensor number: 0 to numTempSensor-1

Returns:

void

### Get OneWire index for a device:
uint8_t getOneWireIndexFromTempSensorIndex(uint8_t tempSensorIndex)

Arguments:

tempSensorIndex - Sensor number: 0 to numTempSensor-1

Returns:

The device's OneWire index - it will be different from tempSensorIndex if there are non-DS18xx type devices on the bus.

### Set how the end of conversion cycle will be detected:
void setUseConversionTimer(boolean state)

Arguments:

state - If true, the end of cylce will be determined by time specified in DS18B20 datasheet. If false, the end of cylce will be determined by the OneWire data line going high (not applicable in parasite power mode).

Returns:

void

### Retrieve method for determining end of conversion cycle:
boolean getUseConversionTimer()

Returns:

none

Returns:

true if timing method in use, otherwise false.



## Credits:
This code is simply a wrapper for the well-written Arduino-Temperature-Control-Library. See:
https://github.com/milesburton/Arduino-Temperature-Control-Library/blob/master/README.md#credits

0 comments on commit c82cd3d

Please sign in to comment.