talofer99 icon

hx711

talofer99 | PRO | 08/11/19 06:24:37 PM UTC | 0 ⭐ | 329 👁️ | Never ⏰ | []
text |

350 B

|

None

|

0 👍

/

0 👎

#include "HX711.h"
  // HX711 circuit wiring
const int DOUT = D2;
const int CLK = D1;
   void setup() {
  Serial.begin(1150200);
  Serial.println("Started");
  HX711 scale(DOUT, CLK);
  scale.set_scale();
  scale.tare();
}
 void loop() {
  scale.set_scale(calibration_factor);
  float weight = scale.get_units();
  Serial.print(weight, 2);
}

Comments