Skip to content

Commit ceb4d58

Browse files
committed
0.6.1 HX711
1 parent f10adf3 commit ceb4d58

File tree

22 files changed

+44
-12
lines changed

22 files changed

+44
-12
lines changed

libraries/HX711/CHANGELOG..md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

77

8+
## [0.6.1] - 2025-06-19
9+
- fix #65, is_ready() => set dataPin to INPUT_PULLUP
10+
- minor edits
11+
812
## [0.6.0] - 2025-04-10
913
- fix #60, change parameter **void calibrate_scale(float weight, uint8_t times = 10)**
1014
- update readme.md

libraries/HX711/HX711.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// FILE: HX711.cpp
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.6.0
4+
// VERSION: 0.6.1
55
// PURPOSE: Library for load cells for UNO
66
// URL: https://github.com/RobTillaart/HX711_MP
77
// URL: https://github.com/RobTillaart/HX711
@@ -33,7 +33,7 @@ void HX711::begin(uint8_t dataPin, uint8_t clockPin, bool fastProcessor )
3333
_clockPin = clockPin;
3434
_fastProcessor = fastProcessor;
3535

36-
pinMode(_dataPin, INPUT);
36+
pinMode(_dataPin, INPUT_PULLUP);
3737
pinMode(_clockPin, OUTPUT);
3838
digitalWrite(_clockPin, LOW);
3939

@@ -295,14 +295,14 @@ float HX711::get_value(uint8_t times)
295295
break;
296296
}
297297
return raw - _offset;
298-
};
298+
}
299299

300300

301301
float HX711::get_units(uint8_t times)
302302
{
303303
float units = get_value(times) * _scale;
304304
return units;
305-
};
305+
}
306306

307307

308308
///////////////////////////////////////////////////////////////

libraries/HX711/HX711.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// FILE: HX711.h
44
// AUTHOR: Rob Tillaart
5-
// VERSION: 0.6.0
5+
// VERSION: 0.6.1
66
// PURPOSE: Library for load cells for Arduino
77
// URL: https://github.com/RobTillaart/HX711_MP
88
// URL: https://github.com/RobTillaart/HX711
@@ -15,7 +15,7 @@
1515

1616
#include "Arduino.h"
1717

18-
#define HX711_LIB_VERSION (F("0.6.0"))
18+
#define HX711_LIB_VERSION (F("0.6.1"))
1919

2020

2121
const uint8_t HX711_AVERAGE_MODE = 0x00;

libraries/HX711/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ This is a close "relative" of the HX711 that allows to set the SPS to
9393

9494
- https://github.com/bogde/HX711
9595
- https://github.com/RobTillaart/weight (conversions kg <> stone etc.)
96-
- https://github.com/RobTillaart/HX710
96+
- https://github.com/RobTillaart/HX710AB
9797
- https://github.com/RobTillaart/HX711
9898
- https://github.com/RobTillaart/HX711_MP multipoint calibration version.
9999

@@ -473,15 +473,19 @@ See https://github.com/RobTillaart/HX711/issues/40
473473
#### Could
474474

475475
- optimize fastProcessor code (possible better performance)
476-
- injecting 2 microdelays is not always needed.
476+
- injecting 2 micro delays is not always needed.
477477
- int flag instead of bool.
478478
- test different load cells
479479
- make enum of the MODE's
480480
- add examples
481481
- example the adding scale
482482
- void weight_clr(), void weight_add(), float weight_get() - adding scale
483483
- decide pricing keep/not => move to .cpp
484-
- add **setRate()** and **getRate()** - sample rate 10/80 SPS
484+
- support **rate**
485+
- **void setRatePin(uint8_t pin)** sets the IO pin for rate selection.
486+
See section above.
487+
- **bool setRate(uint8_t sps)** rate = 10 or 80 SPS, returns false on incorrect input
488+
- **uint8_t getRate()** - returns 10 or 80
485489
- optional?
486490

487491
#### Wont

libraries/HX711/examples/HX_calibration/HX_calibration.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ uint8_t clockPin = 7;
1717
void setup()
1818
{
1919
Serial.begin(115200);
20+
Serial.println();
2021
Serial.println(__FILE__);
2122
Serial.print("HX711_LIB_VERSION: ");
2223
Serial.println(HX711_LIB_VERSION);

libraries/HX711/examples/HX_delta_scale/HX_delta_scale.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ float w1, w2, previous = 0;
1919
void setup()
2020
{
2121
Serial.begin(115200);
22+
Serial.println();
2223
Serial.println(__FILE__);
2324
Serial.print("HX711_LIB_VERSION: ");
2425
Serial.println(HX711_LIB_VERSION);

libraries/HX711/examples/HX_get_noise_statistics/HX_get_noise_statistics.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ statistic::Statistic<float, uint32_t, true> myStats;
4545
void setup()
4646
{
4747
Serial.begin(115200);
48+
Serial.println();
4849
Serial.println(__FILE__);
4950
Serial.print("HX711_LIB_VERSION:\t");
5051
Serial.println(HX711_LIB_VERSION);

libraries/HX711/examples/HX_grocery_scale/HX_grocery_scale.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ uint8_t clockPin = 7;
1717
void setup()
1818
{
1919
Serial.begin(115200);
20+
Serial.println();
2021
Serial.println(__FILE__);
2122
Serial.print("HX711_LIB_VERSION: ");
2223
Serial.println(HX711_LIB_VERSION);

libraries/HX711/examples/HX_is_ready/HX_is_ready.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ uint8_t clockPin = 7;
1717
void setup()
1818
{
1919
Serial.begin(115200);
20+
Serial.println();
2021
Serial.println(__FILE__);
2122
Serial.print("HX711_LIB_VERSION: ");
2223
Serial.println(HX711_LIB_VERSION);

libraries/HX711/examples/HX_kitchen_scale/HX_kitchen_scale.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ uint8_t clockPin = 18; // for ESP32
1818
void setup()
1919
{
2020
Serial.begin(115200);
21+
Serial.println();
2122
Serial.println(__FILE__);
2223
Serial.print("HX711_LIB_VERSION: ");
2324
Serial.println(HX711_LIB_VERSION);

0 commit comments

Comments
 (0)