You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: devices/Hx711/README.md
+25-4
Original file line number
Diff line number
Diff line change
@@ -11,27 +11,48 @@ This is a library to interact with the Hx711 ADC. This is conveniently assembled
11
11
12
12
## Usage
13
13
14
-
**Important**: make sure you setup the SPI pins for ESP32 before creating the `Scale`. For this, make sure you install the `nanoFramework.Hardware.ESP32` NuGet:
14
+
### Signals and connections
15
+
16
+
Check the connections for the WEIGTH module at the [product page](https://docs.m5stack.com/en/unit/weight).
17
+
From the schematic one can see these signals:
18
+
19
+
* DOUT: Grove connector pin 1
20
+
* PDSCK: Grove connector pin 2
21
+
22
+
Our code is using SPI to generate the clock signals and read back data from the HX711, so the connections need to match the SPI signals like this:
23
+
24
+
* MOSI -> PDSCK
25
+
* MISO -> DOUT
26
+
27
+
SPI clock is not used so feel free to route to an unused GPIO.
28
+
There is also no need for the CS signal so no need to define a pin for it.
29
+
30
+
**Important**: make sure you setup the SPI pins for ESP32 before creating the `Scale`. For this, make sure you install the `nanoFramework.Hardware.ESP32` NuGet.
> Make sure to follow the instructions above. At first glance they can look contrary to the naming of the signals and schematics in M5Stack documentation. That's because the GROVE connectors are meant to use I2C and their implementation of the driver is different from ours.
47
+
29
48
For other devices, like STM32, please make sure you're using the pins for the UART you want to use.
30
49
50
+
### Configuring SPI
51
+
31
52
```csharp
32
53
// setup SPI connection settings
33
54
// the clock value was adjusted in order to get the typical duration expected by the PD_SCK ~1us
0 commit comments