documented hx711

This commit is contained in:
chris 2015-10-08 20:43:57 -07:00
parent cf079fa333
commit c298a5cf60
1 changed files with 10 additions and 0 deletions

View File

@ -573,3 +573,13 @@ value = { true, { foo = "bar" } }
json_text = cjson.encode(value) json_text = cjson.encode(value)
-- Returns: '[true,{"foo":"bar"}]' -- Returns: '[true,{"foo":"bar"}]'
``` ```
####Read an HX711 load cell ADC.
Note: currently only chanel A with gain 128 is supported.
The HX711 is an inexpensive 24bit ADC with programmable 128x, 64x, and 32x gain.
```lua
-- Initialize the hx711 with clk and data pin assignments
hx711.init(5,6)
-- Read ch A with 128 gain.
raw_data = hx711.read()
```