X-Git-Url: http://git.rot13.org/?p=Arduino;a=blobdiff_plain;f=HX711%2FHX711.ino;h=4ba97fee5f56531403b4b0c8a172d56648a13f19;hp=f14f062bd2d6ffd830577be38c3239619e83d084;hb=a4ea594dc96e5ca3cf8b78f4aa0f30a61a9b6749;hpb=037082d02677afa0c61b691baf753ec414bb8686 diff --git a/HX711/HX711.ino b/HX711/HX711.ino index f14f062..4ba97fe 100644 --- a/HX711/HX711.ino +++ b/HX711/HX711.ino @@ -13,8 +13,9 @@ void setup() { lcd.print("HX711"); Serial.begin(115200); - Serial.println("HX711 Demo"); + Serial.println("HX711"); +/* Serial.println("Before setting up the scale:"); Serial.print("read: \t\t"); Serial.println(scale.read()); // print a raw reading from the ADC @@ -28,10 +29,10 @@ void setup() { Serial.print("get units: \t\t"); Serial.println(scale.get_units(5), 1); // print the average of 5 readings from the ADC minus tare weight (not set) divided // by the SCALE parameter (not set yet) - +*/ scale.set_scale(465.f); // this value is obtained by calibrating the scale with known weights; see the README for details scale.tare(); // reset the scale to 0 - +/* Serial.println("After setting up the scale:"); Serial.print("read: \t\t"); @@ -48,6 +49,7 @@ void setup() { // by the SCALE parameter set with set_scale Serial.println("Readings:"); +*/ } #ifdef FLOAT_AVG @@ -76,7 +78,7 @@ void loop() { sum += g_history[pos]; if ( i % g_bucket == 0) { float avg = sum / i; - Serial.print(" "); + Serial.print("\t"); Serial.print(avg, 3); lcd.print(avg); lcd.print(" "); @@ -86,7 +88,7 @@ void loop() { int key = analogRead(0); Serial.print("\t"); - Serial.println(key); + Serial.print(key); lcd.setCursor(12,1); lcd.print(key);