示例#1
0
bool one2two() {
    bool pressed = button_pressed();
    if (pressed) {
        lcd.display();
        led.on();
        lcd.print("Counting!");
    }
    return pressed;
}
void trigger() {
  lcd.clear();         // clears the screen and buffer
  lcd.setCursor(3,0);
  lcd.print("Time is up");
  
  lcd.setCursor(1, 1); // set timer position on lcd for end.
  lcd.print("END OF SHOWER");

  turnDownServo();
  delay(1000);
  lcd.display();
}
示例#3
0
文件: rover.cpp 项目: Tnek/falconia-2
void calibrate_countdown(void) 
{
    lcd.print("Starting rover");
    lcd.display();
    for (int i = 5; i > 0; i--) {
        _count(i*2 - 1);
        delay(1000);
        _count(i*2 - 2);
        humidity();
        moisture();
        delay(1000);
    }
    lcd.clear();
}
示例#4
0
void LCD_set(int row, int col, String text, boolean pad) 
{
  if (!lcd_enabled) {
    lcd_enabled = 1;
    lcd.display();
  }

  /* Pad the string to the full 16 characters */
  if (pad) {
    for (int i = col + text.length(); i < 16; i++) {
      text += " ";
    }
  }

  lcd.setCursor(col, row);
  lcd.print(text);
  lcd_update_time = millis();
}