endail / hx711

Raspberry Pi HX711 C++ Library
MIT License
18 stars 10 forks source link

Investigate use of lgTxPulse for pulsing clock pin #52

Open endail opened 2 years ago

endail commented 2 years ago

Currently, the clock pin is pulsed with two GPIO write calls through the lg library:

https://github.com/endail/hx711/blob/master/src/HX711.cpp#L88 https://github.com/endail/hx711/blob/master/src/HX711.cpp#L97

Both call lgGpioWrite through the Utility class. But lg also has a lgTxPulse function.

I am wondering if using lgTxPulse to provide a single pulse to the HX711's clock pin may be more efficient than the two lgGpioWrite calls. If it is, it may also help to avoid the 60us power down issue.