本文整理汇总了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;
}
示例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)
}
示例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;
}
}