Commit c298a5cf authored by chris's avatar chris
Browse files

documented hx711

parent cf079fa3
...@@ -573,3 +573,13 @@ value = { true, { foo = "bar" } } ...@@ -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()
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment