![](https://csdnimg.cn/release/download_crawler_static/88784321/bg3.jpg)
u8 Temperature_HighLimit=30;//µÚ¶þҳζÈÉÏÏÞ
u8 Temperature_LowLimit=10; //µÚ¶þҳζÈÏÂÏÞ
u8 LCD_Str[30]; //ÏÔʾ×Ö·ûÔÝ´æÊý×é
u8 Motor_Opendegree=0; //´°Á±¿ªºÏ³Ì¶È
//************************************º¯Êý¶¨Òå************************************//
int main(void)
{
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
delay_init(); //ÑÓʱº¯Êý³õʼ»¯
uart_init(9600); //´®¿Ú³õʼ»¯Îª9600
LED_Init(); //³õʼ»¯ÓëLEDÁ¬½ÓµÄÓ²¼þ½Ó¿Ú
KEY_Init();
Adc_Init();
Moto_Init();
Remote_Init();
Motor_Locate(100,2000); // ÉèÖà ´°Á±³õ ʼλÖÃ
LCD_Init();
LCD_Display_Dir(1);
POINT_COLOR=BLUE;
LCD_DrawRectangle(20,20,300,220); //»·½¿ò x1 y1; x2 y2
// while(DS18B20_Init())
// {
// LCD_ShowString(40,100,60,12,12,"DS18B20 error!!!");
// delay_ms(500);
// }
while(RTC_Init()) / RTC³õʼ»¯£¬ÉèÖÿªÊ¼Ê±¼ä
{
LCD_ShowString(20,20,60,12,12,"error!!!");
delay_ms(800);
}
LCD_ShowString(30,180,300,16,16,"real time : - - ");
LCD_ShowString(30,200,300,16,16,"real time : : : ");
POINT_COLOR=BLUE;
LCD_ShowNum(126,180,calendar.w_year,4,16);
LCD_ShowNum(166,180,calendar.w_month,2,16);
LCD_ShowNum(190,180,calendar.w_date,2,16);