The code is very simple... once the setup is in place: #include "HX711.h" #include #include "fonts/allFonts.h" // system font HX711 cell(12, 13); void setup() { Serial.begin(9600); GLCD.Init(); GLCD.ClearScreen(); GLCD.SelectFont(Arial_bold_14); GLCD.CursorTo(0,0); GLCD.Puts("Hopa sus ... :)"); GLCD.SelectFont(fixednums15x31); } long val = 0; float count = 0; String lcdString; void loop() { count = count + 1; // Use only one of these //val = ((count-1)/count) * val + (1/count) * cell.read(); // take long term average val = 0.5 * val + 0.5 * cell.read(); // take recent average //val = cell.read(); // most recent reading //lcdString = "Raw value: "+count; GLCD.CursorTo(4, 1); GLCD.Puts(String(val / 1000)); Serial.println( val ); }
can you explain more how ti do this project, please
hi what the glcd driver? plz write component
and plz put a Librarys
send the code plz
The code is very simple... once the setup is in place:
#include "HX711.h"
#include
#include "fonts/allFonts.h" // system font
HX711 cell(12, 13);
void setup() {
Serial.begin(9600);
GLCD.Init();
GLCD.ClearScreen();
GLCD.SelectFont(Arial_bold_14);
GLCD.CursorTo(0,0);
GLCD.Puts("Hopa sus ... :)");
GLCD.SelectFont(fixednums15x31);
}
long val = 0;
float count = 0;
String lcdString;
void loop() {
count = count + 1;
// Use only one of these
//val = ((count-1)/count) * val + (1/count) * cell.read(); // take long term average
val = 0.5 * val + 0.5 * cell.read(); // take recent average
//val = cell.read(); // most recent reading
//lcdString = "Raw value: "+count;
GLCD.CursorTo(4, 1);
GLCD.Puts(String(val / 1000));
Serial.println( val );
}