I want to create a digital scale and view it's readings live in my website. I am using a nodemcu for this purpose. I have created a small program that reads the data from a hx711 amp which is connected to 2 loadcells. Now I want to take that data and send it to a database server and then pull the data into my website. I have searched a lot and followed a lot of tutorials but cannot understand how to get the data from the loadcell to the database. Here is my code that can read the loadcells :
#include "HX711.h"
#define calibration_factor 895000 //random value, i can adjust it later
#define DOUT D1
#define CLK D2
HX711 scale(DOUT, CLK);
void setup(){
Serial.begin(115200);
Serial.println("Claibrate");
scale.set_scale(calibration_factor);
scale.tare();
Serial.println("OK");
}
void loop(){
Serial.print("Reading");
Serial.print(scale.get_units(), 3);
Serial.println("kg");
}
This is my first time doing a iot project so please help me somebody and also let me know if I missed out some vital info.