⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 functions.c

📁 ds18b20 thermometer with lcd, ds18b20 thermometer with lcd, ds18b20 thermometer with lcd
💻 C
字号:
#include <util/delay.h>
#include "ds182x.h"
#include "lcd.h"
#include "1-wire.h"

void InitSystem(void)
{
	lcd_init();
	lcd_contrast(0x4F); //F - the highest constras
}

void ShowMe(void)
{
	//lcd_clear();
	//lcd_goto_xy(4,3);
	//lcd_str("Alicja i");
	//lcd_goto_xy(4,4);
	//lcd_str("Marek");
	//lcd_goto_xy(4,5);
	//lcd_str("18:33");
}

void SB1(void)
{
	lcd_goto_xy(4,2);
	lcd_str("KOCHAM");
	lcd_goto_xy(4,3);
	lcd_str("ALICJE!!!");
}

void SB2(void)
{
	/*char str[1];
	u_char i = TM_Init();

	if (i == 0)
	{
		lcd_goto_xy(1,2);
		lcd_str("Not present");
	}
	else
	{	
		itoa(i,str,10);
		lcd_goto_xy(1,2);
		lcd_str("Present ");
		lcd_str(str);
		lcd_goto_xy(1,3); */

		get_this_stupid_temperature_now();
		
		/*char char_tempe[50];
		u_int int_tempe = TM_Read_temperature(0);
		u_int frac;
		_delay_us(400);
		TM_Convert_temperature(0,&int_tempe,&frac);
		
		ltoa(int_tempe,char_tempe,10);
		//itoa(int_tempe,char_tempe,2);
		lcd_str(char_tempe);*/
				
		//int_tempe = TM_Read_temperature(0);
		//itoa(int_tempe,char_tempe,2);
		//ltoa(int_tempe,char_tempe,2);
		//lcd_str(char_tempe);

		//TM_Convert_temperature(0,char_tempe,2);	

		//itoa(int_tempe,char_tempe,2);
		//lcd_str(char_tempe);
	//}
}

void SB3(void)
{
	lcd_clear();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -