|
void HX711::powerUp() { |
|
|
|
std::lock_guard<std::mutex> lock(this->_commLock); |
|
|
|
/** |
|
* "When PD_SCK returns to low, |
|
* chip will reset and enter normal operation mode" |
|
* Datasheet pg. 5 |
|
*/ |
|
Utility::writeGpio(this->_gpioHandle, this->_clockPin, GpioLevel::LOW); |
|
|
|
/** |
|
* "Settling time refers to the time from power up, reset, |
|
* input channel change and gain change to valid stable output data." |
|
* Datasheet pg. 3 |
|
*/ |
|
if(this->_rate != Rate::OTHER) { |
|
Utility::sleep(_SETTLING_TIMES.at(this->_rate)); |
|
} |
|
|
|
} |
Sleeping for settling time should be separate to powering up.