Raspberry Pi Weighting Control System
This project serves as a simple weighting control system, that was realized as a Bachelor Thesis
custom_hx711.h
Go to the documentation of this file.
1 #ifndef CUSTOM_HX711_H
2 #define CUSTOM_HX711_H
3 
4 #include <hx711/common.h>
5 
6 using namespace HX711;
7 
13 class custom_watcher : public Watcher {
14  public:
16  custom_watcher(HX711::HX711 *hx);
17 
19  WatchState get_watch_state();
20 };
21 
27 class custom_hx711 : public AdvancedHX711 {
28  protected:
30 
31 
32  public:
35  const int dataPin,
36  const int clockPin,
37  const Value refUnit = 1,
38  const Value offset = 0,
39  const Rate rate = Rate::HZ_10);
40 
48  virtual std::vector<Value> getValues(const std::chrono::nanoseconds timeout) override;
56  virtual std::vector<Value> getValues(const std::size_t samples) override;
66  virtual std::vector<Value> getValues(const std::chrono::nanoseconds timeout, std::vector<Value> **watchdog);
76  virtual std::vector<Value> getValues(const std::size_t samples, std::vector<Value> **watchdog);
81  virtual void stop_reading();
82 };
83 
84 #endif
Extends HX711 library AdvancedHX711. Custom implementations for value reading, so it can be observed ...
Definition: custom_hx711.h:27
custom_watcher * _wx
Definition: custom_hx711.h:29
custom_watcher extends HX711 library Watcher. Reason is to get access to the watcher state,...
Definition: custom_hx711.h:13