Hello there. I am just beginning with Photon, and starting with DS1820 sensor.
While browsing the forums I found known working example https://github.com/justinatomatic/DallasTemperature_SparkCore.git
Which is not compiling because of missing max(),**delay()**or millis() functions:
DallasTemperature.cpp: In member function 'void DallasTemperature::begin()':
DallasTemperature.cpp:59:67: error: 'max' was not declared in this scope
bitResolution = max(bitResolution, getResolution(deviceAddress));
^
DallasTemperature.cpp: In member function 'void DallasTemperature::writeScratchPad(uint8_t*, const uint8_t*)':
DallasTemperature.cpp:191:25: error: 'delay' was not declared in this scope
if (parasite) delay(10); // 10ms delay
^
DallasTemperature.cpp: In member function 'void DallasTemperature::setResolution(uint8_t)':
DallasTemperature.cpp:212:49: error: 'constrain' was not declared in this scope
bitResolution = constrain(newResolution, 9, 12);
^
I feel like something obvious is missing, why these functions may be out of scope?