webduino.module.HX711
The HX711 Class.
HX711 is a precision 24-bit analogto-digital converter (ADC) designed for weigh scales.
Table of Contents
Constructor
webduino.module.HX711
-
board
-
sckPin
-
dtPin
Parameters:
-
board
webduino.BoardThe board that the IRLed is attached to.
-
sckPin
IntegerThe pin that Serial Clock Input is attached to.
-
dtPin
IntegerThe pin that Data Output is attached to.
Methods
addListener
-
type
-
listener
Add a listener for a certain type of event.
Parameters:
-
type
StringEvent type.
-
listener
FunctionEvent listener.
emit
-
type
-
object,...
Emit an event of certain type.
Parameters:
-
type
StringEvent type.
-
[object,...]
Object optionalEvent object(s).
listeners
-
type
Return the listener list bound to certain type of event.
Parameters:
-
type
StringEvnet type.
measure
-
callback
Start detection.
Parameters:
-
[callback]
Function optionalCallback after starting detection.
off
()
Stop detection.
on
-
callback
Start detection.
Parameters:
-
[callback]
Function optionalCallback after starting detection.
once
-
type
-
listener
Add a one-time listener for a certain type of event.
Parameters:
-
type
StringEvent type.
-
listener
FunctionEvent listener.
removeAllListeners
-
type
Remove all listeners of certain type.
Parameters:
-
type
StringEvent type.
removeListener
-
type
-
listener
Remove a listener for certain type of event.
Parameters:
-
type
StringEvent type.
-
listener
FunctionEvent listener.
setMaxListeners
-
n
Set maximum number of listeners that is allow to bind on an emitter.
Parameters:
-
n
NumberNumber of listeners.
Attributes
Events
HX711.MESSAGE
Fires when the value of weight has changed.