当前位置: 首页>>代码示例>>C++>>正文


C++ LCD::setLineTwo方法代码示例

本文整理汇总了C++中LCD::setLineTwo方法的典型用法代码示例。如果您正苦于以下问题:C++ LCD::setLineTwo方法的具体用法?C++ LCD::setLineTwo怎么用?C++ LCD::setLineTwo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LCD的用法示例。


在下文中一共展示了LCD::setLineTwo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main(void)
{

	POWEROFF();
	delayU(100);
	POWERUP();

	lcd.setLineOne("Welcome to");
	lcd.setLineTwo("TowerBuilder");
	sei();        //Enable global interrupt

	while(1)
	{
		//Send 1 character to LCD if LCD is ready
		if(lcd.ready())
		lcd.print();

		//Task scheduler
		if(taskDone == FALSE) {

			switch(taskNumber++) {

				case 0:
				button.readButtons();
				menu();
				break;

				case 1:
				adc.convertPOT();
				break;

				case 2:
				sensor.readSensors();
				break;

				case 3:
				first();
				break;

				case 4:

				break;

				case 5:

				break;

				case 6:

				break;

				default:
				taskNumber = 0;
				break;
			}

			taskDone = TRUE;

			//Update servo's channel after each task finished
			while(updateChannel == FALSE);
			servo.servoPWM();
			updateChannel = FALSE;

		}
	}
}
开发者ID:mayyuen318,项目名称:may,代码行数:66,代码来源:TowerBuilder_student.cpp

示例2: menu


//.........这里部分代码省略.........

	if (MidR <10)
	{
		MidR += 0x30;
	}
	else
	{
		MidR +=55;
	}

	row1[6]= MidL;
	row1[7]= MidR;

	////////////////////////// c TO d, 3 TO b/f
	if ( FrontL <10 )
	{
		FrontL += 0x30;
	}
	else
	{
		FrontL +=55;
	}

	if (FrontR <10)
	{
		FrontR += 0x30;
	}
	else
	{
		FrontR +=55;
	}

	row1[1]= FrontL;
	row1[2]= FrontR;
	//////////////////////////
	if ( BackL <10 )
	{
		BackL += 0x30;
	}
	else
	{
		BackL +=55;
	}

	if (BackR <10)
	{
		BackR += 0x30;
	}
	else
	{
		BackR +=55;
	}

	row1[11]= BackL;
	row1[12]= BackR;



	lcd.setLineOne(row1);
	row2[0] = condition + 48;
	row2[2] = nextCondition + 48;

	char check1L = check1 & 0xF0;
	char check1R = check1 & 0x0F;
	check1L = check1L >> 4;
	if(check1L < 10) check1L += 0x30;
	else check1L += 55;
	if(check1R < 10) check1R += 0x30;
	else check1R += 55;

	char check2L = check2 & 0xF0;
	char check2R = check2 & 0x0F;
	check2L = check2L >> 4;
	if(check2L < 10) check2L += 0x30;
	else check2L += 55;
	if(check2R < 10) check2R += 0x30;
	else check2R += 55;

	char check3L = check3 & 0xF0;
	char check3R = check3 & 0x0F;
	check3L = check3L >> 4;
	if(check3L < 10) check3L += 0x30;
	else check3L += 55;
	if(check3R < 10) check3R += 0x30;
	else check3R += 55;

	row2[4] = check1L;
	row2[5] = check1R;

	row2[7] = check2L;
	row2[8] = check2R;

	row2[10] = check3L;
	row2[11] = check3R;

	lcd.setLineTwo(row2);



}
开发者ID:mayyuen318,项目名称:may,代码行数:101,代码来源:TowerBuilder_student.cpp


注:本文中的LCD::setLineTwo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。