We used arduino to test our system, and see the different value when we applied different weight on our sensor:
#include "HX711.h"
const int DOUT_PIN = 2;
const int SCK_PIN = 3;
HX711 scale;
void setup() {
Serial.begin(9600);
scale.begin(DOUT_PIN, SCK_PIN);
}
void loop() {
if (scale.is_ready()) {
long weight = scale.get_units(); // Get the weight in grams
Serial.println("Weight: " + String(weight) + " g");
delay(1000); // You can adjust the delay based on your requirements
} else {
Serial.println("Error reading from scale");
}
}
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.