18 #include "../../SmingCore/Wire.h" 24 #define COPYSCRATCH 0x48 // Copy EEPROM 25 #define READSCRATCH 0xBE // Read EEPROM 26 #define WRITESCRATCH 0x4E // Write EEPROM 27 #define RECALLSCRATCH 0xB8 // Reload last 28 #define READPOWERSUPPLY 0xB4 // parasite power 29 #define ALARMSEARCH 0xEC // Query for alarm 30 #define STARTCONVO 0x44 // temperature reading 111 void StartReadNext();
112 uint8_t FindAlladdresses();
115 bool InProgress =
false;
122 uint8_t numberOfread=0;
bool MeasureStatus()
Check if measurement is in progress.
uint8_t GetSensorsCount()
Get the quantity of sensors detected during last measurement.
bool IsValidTemperature(uint8_t)
Check if the last measurement for a sensor is valid.
DS18S20()
Instantiate a DS18S20 object.
uint64_t GetSensorID(uint8_t)
Get the ID (1-wire address) of a sensor.
void Init(uint8_t)
Initiate communication on 1-wire bus.
void StartMeasure()
Start measurement of all connected sensors.
void RegisterEndCallback(DS18S20CompletedDelegate)
Register the callback function that is run when measurement is complete.
Delegate< void()> DS18S20CompletedDelegate
Definition of callback function called on completion of measurement of all DS18S20 sensors...
Definition: ds18s20.h:35
float GetCelsius(uint8_t)
Get the value of the last measurment from a sensor.
float GetFahrenheit(uint8_t)
Get the value of the last measurment from a sensor.
This class implements access to the DS18x20 range of temperature sensors.
Definition: ds18s20.h:39
#define MAX_SENSORS
Maximum quantity of sensors to read.
Definition: ds18s20.h:20
void UnRegisterCallback()
Unregister the callback function to avoid activity after measurement is complete. ...