1. 主页
  2. 文档
  3. SNAR3 arduino电子称制作教程...
  4. 程序
  5. 0x3f

0x3f

//SINONING
//www.haibucuo.com
//www.sinoning.com v0.1
#include”HX711.h”
int Weight = 0;
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3f,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup() {
Serial.begin(9600);
lcd.init(); // initialize the lcd
lcd.init();
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(3,0);

lcd.print(“SINONING Scale!”);
Init_Hx711();
Get_Maopi(); //clear the weight
delay(3000);
}
void loop() {
lcd.clear();
Weight = Get_Weight();
lcd.print(“Weight = “);
lcd.print(Weight); //the true weight
lcd.print(” g”);

delay(1000);
}

我们要如何帮助您?