Skip to content

Commit

Permalink
fix #56, make breaking change more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Nov 18, 2024
1 parent 8dd2657 commit faa05e6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion HX711.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// FILE: HX711.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.5.1
// VERSION: 0.5.2
// PURPOSE: Library for load cells for UNO
// URL: https://github.com/RobTillaart/HX711_MP
// URL: https://github.com/RobTillaart/HX711
Expand Down
4 changes: 2 additions & 2 deletions HX711.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// FILE: HX711.h
// AUTHOR: Rob Tillaart
// VERSION: 0.5.1
// VERSION: 0.5.2
// PURPOSE: Library for load cells for Arduino
// URL: https://github.com/RobTillaart/HX711_MP
// URL: https://github.com/RobTillaart/HX711
Expand All @@ -15,7 +15,7 @@

#include "Arduino.h"

#define HX711_LIB_VERSION (F("0.5.1"))
#define HX711_LIB_VERSION (F("0.5.2"))


const uint8_t HX711_AVERAGE_MODE = 0x00;
Expand Down
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ This translates roughly to 4 or max 5 significant digits in a single measurement
That's why multiple measurements are advised to average and reduce the noise.


### Breaking change 0.4.0

The **begin()** function has a new parameter **bool fastProcessor** which is default false.
It is used to slow down the internal **shiftIn()** to keep clock pulses within the
specification. For most processors the internal code is "slow enough".
If the processor can set an IO pin faster than 0.4 us (spec datasheet == 0.2 us),
the parameter **fastProcessor** must be set to true.


### Breaking change 0.3.0

In issue #11 it became clear that the timing of the default **shiftIn()** function to
Expand Down Expand Up @@ -79,6 +88,7 @@ For now one can add an IOpin for this and use **digitalWrite()**.

- https://github.com/bogde/HX711
- https://github.com/RobTillaart/weight (conversions kg <> stone etc.)
- https://github.com/RobTillaart/HX710
- https://github.com/RobTillaart/HX711
- https://github.com/RobTillaart/HX711_MP multipoint calibration version.

Expand Down Expand Up @@ -116,7 +126,7 @@ Steps to take for calibration

- **HX711()** constructor.
- **~HX711()**
- **void begin(uint8_t dataPin, uint8_t clockPin, bool fastProcessor)** sets a fixed gain 128 for now.
- **void begin(uint8_t dataPin, uint8_t clockPin, bool fastProcessor = false)** sets a fixed gain 128 for now.
The fastProcessor option adds a 1 uS delay for each clock half-cycle to keep the time greater than 200 nS.
- **void reset()** set internal state to start condition.
Since 0.3.4 reset also does a power down / up cycle.
Expand Down Expand Up @@ -294,8 +304,8 @@ For weight conversion functions see https://github.com/RobTillaart/weight

To be verified in a test setup.

In issue #53, a question was asked to convert the input of the HX711 to milivolts.
Thinking about this question resulted in a simple and imho an elegant idea:
In issue #53, a question was asked to convert the input of the HX711 to millivolts.
Thinking about this question resulted in a simple and elegant idea:

- Apply 0.000 mV to the system.
- Call **tare(times)** to calibrate the zero point.
Expand All @@ -306,7 +316,7 @@ Assuming the scale is linear, the HX711 now works like a millivolt meter.
And the **float get_units(uint8_t times = 1)** will return microvolts.

In fact, one could map any linear unit this way, e.g. if the voltage applied
is linear with temperature, humidity or windspeed one can map this directly.
is linear with temperature, humidity or wind speed one can map this directly.


## Notes
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/HX711"
},
"version": "0.5.1",
"version": "0.5.2",
"license": "MIT",
"frameworks": "*",
"platforms": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=HX711
version=0.5.1
version=0.5.2
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for HX711 load cell amplifier
Expand Down

0 comments on commit faa05e6

Please # to comment.