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


C++ LiquidCrystal::blink方法代码示例

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


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

示例1: loop

void loop()
{
      val=encoder/faktor;
 
      if (val < minimum)
            {val=minimum;
             encoder=minimum*faktor;}
    
      if (val > maximum)
            {val=maximum;
             encoder=maximum*faktor;}

  if (val !=val_old)
   { 
    // Serial.print (encoder);
    // Serial.print (" ");
    // Serial.print (val);
    // Serial.print (" ");
     
      val_old=val;
      
         sprintf(buffer,"%3d",val);
         digitalWrite(stepper_enable, LOW);
        
         lcd.setCursor(10, 2);
         lcd.print(buffer);
       
       //lcd.cursorTo(1, 10); 
      // lcd.printIn(buffer);
      
        stepper.step(100);

   } 


digitalWrite(stepper_enable, HIGH);
          if (abs (val - stepper_position) >10)
          { lcd.setCursor(19, 3);
            lcd.blink();}
         
          stepper.step(val - stepper_position);
         
          lcd.noBlink();
   
digitalWrite(stepper_enable, LOW);
stepper_position=val;
}
开发者ID:ralfberge,项目名称:git,代码行数:47,代码来源:interrupt_2.cpp

示例2: chooseCurve

// Allows the user to choose whether they want to use
//		a default heating curve or define their own curve
// Returns the user's choice
boolean CurveInput::chooseCurve()
{
	printWelcome(WELCOME_DURATION);
	printCurveChoices();
	lcd.blink(); // show cursor
	byte buttonID = NONE;
	while ( buttonID != SELECT ) // any button other than SELECT
	{
		buttonID = btn.waitForButton();
		btn.actionNavigate(buttonID, CURVE_CHOICE_DURATION,
						   &col, &row, 0, 0, 0, 1); // up/down choice
								// between default (A) and user
								// defined curve (B)
	}
	lcd.noBlink();
	return row; // Choice will either be top (Defaut)
		// or bottom row (User-Defined)
}
开发者ID:mjvogelsong,项目名称:Heater,代码行数:21,代码来源:CurveInput.cpp

示例3: loop

void loop() {
	lcd.print("Minutes: ");
	lcd.setCursor(0,1);
	lcd.blink();
	while (selectmin == true) {
		lcd_key = read_LCD_buttons();
		switch (lcd_key) {
			case btnRIGHT: 
				break;
			case btnLEFT: 
				break;
			case btnUP: {
				minutes = minutes + 1;
				lcd.setCursor(0,1);
				lcd.print(minutes);
				break;
			}
			case btnDOWN: {
				if (minutes > 0) {
					minutes = minutes - 1;
					lcd.setCursor(0,1);
					lcd.print(minutes);
				}
				break;
			}
			case btnSELECT: {
				selectmin = false;
				break;
			}
			case btnNONE: 
				break;			
		}
		delay(200); 
	}
	lcd.clear(); 
	delay(500);
	lcd.print("Seconds: ");
	lcd.setCursor(0,1);
	lcd.blink();
	while (selectsec == true) {
		lcd_key = read_LCD_buttons();
		switch (lcd_key) {
			case btnRIGHT: 
				break;
			case btnLEFT: 
				break;
			case btnUP: {
				if (seconds == 59) {
					seconds = 0;
				} else {
				seconds = seconds + 1;
				}
				lcd.setCursor(0,1);
				lcd.print(seconds);
				break;
			}
			case btnDOWN: {
				if (seconds > 0) {
					seconds = seconds - 1;
				} else if (seconds == 0) {
					seconds = 59;
				}
				lcd.setCursor(0,1);
				lcd.print(seconds);
				}
				break;
			}
			case btnSELECT: {
				selectsec = false;
				break;
			}
			case btnNONE: 
				break;			
		}
	}
开发者ID:Rishabhj,项目名称:BME354,代码行数:75,代码来源:Stopwatch.c


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