#include "main.h"
#include "HX711.h"
#include "uart.h"
#include "LCD1602.h"
#include "temp.h"
#define uchar unsigned char
#define uint unsigned int
typedef unsigned char u8;
typedef unsigned short int u16;
unsigned long HX711_Buffer = 0;
unsigned long Weight_Maopi = 0;
long Weight_Shiwu = 0;
unsigned long Weight_Maopi1 = 0;
long Weight_Shiwu1 = 0;
long Weight_Shiwu3 = 000;
long Weight_Shiwu4 = 10;
unsigned char flag = 0;
bit Flag_ERROR = 0;
bit Flag_send = 0;
sbit People= P3^6;
sbit JINSHU= P3^2;
unsigned char a;
char qingpin=0;
char shuju[]="0123456789";
int TEMP=0;
//校准参数
//因为不同的传感器特性曲线不是很一致,因此,每一个传感器需要矫正这里这个参数才能使测量值很准确。
//当发现测试出来的重量偏大时,增加该数值。
//如果测试出来的重量偏小时,减小改数值。
//该值可以为小数
#define GapValue 390
void Get_Maopi1();
void Get_Weight1();
char Key_Scan(char mode);
void TaoCan(void);
int LcdDisplay(int temp); //lcd显示
void BuJing_Crole1(u16 j,u16 time);
void BuJing_Crole2(u16 j,u16 time);
//****************************************************
//主函数
//****************************************************
sbit CTRL = P3^7; //舵机控制端口
void delay_100ms(u16 x);
u16 TIME = 20000; //PWM周期时间(单位us)
u16 Min = 800; //高电平最小