本文整理汇总了C++中LiquidCrystal::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ LiquidCrystal::clear方法的具体用法?C++ LiquidCrystal::clear怎么用?C++ LiquidCrystal::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LiquidCrystal
的用法示例。
在下文中一共展示了LiquidCrystal::clear方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setup
//==============================================================================================
//=============================================SETUP LOOP=======================================
//==============================================================================================
void setup() {
pinMode(RLED, OUTPUT);
pinMode(GLED, OUTPUT);
pinMode(BLED, OUTPUT);
pinMode(wire1, INPUT);
pinMode(wire2, INPUT);
pinMode(wire3, INPUT);
pinMode(wire4, INPUT);
pinMode(largeKey, INPUT);
pinMode(smallKey, INPUT);
TCCR1A |= (1 << COM1A0);
TCCR1B |= (1 << WGM12) | (1 << CS12);
TIMSK1 |= (1 << TOIE1);
sei();
lcd.begin(16, 2);
lcd.clear();
lcd.print("Bomb prop V1.1");
lcd.setCursor(0,1);
lcd.print("J McKenna [MMS]");
for (int i = 0 ; i <= 3 ; i++) {
delay(500);
setLED(0);
delay(500);
setLED(1);
}
lcd.clear();
}
示例2: loop
void loop(){
if(analogRead(0)<800)err=0;
while(err!=1 && digitalRead(pinErr)!=HIGH){
digitalWrite(pinR1, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("R1 ON");
delay(5000);
digitalWrite(pinR2, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("R2 ON");
delay(5000);
//if(analogRead(pinTemp)<=0 && analogRead(pinTemp)>=100) digitalWrite(pinR3, LOW);
//else err=1;
if(digitalRead(pinErr)==HIGH) {
err=1;
lcd.clear();
lcd.print("Err R3");
digitalWrite(pinR1, HIGH);
digitalWrite(pinR2, HIGH);
digitalWrite(pinR3, HIGH);
}
}
lcd.setCursor(0,0);
lcd.print("Error!");
digitalWrite(pinR1, HIGH);
digitalWrite(pinR2, HIGH);
digitalWrite(pinR3, HIGH);
}
示例3: loop
void loop(){
if(gameFinished == false){
float time_to = random(1,2); //.. Aantal milliseconde om mee te beginnen
int i;
float current_multiplier = 0.98;
float cashedOutMultiplier;
int randomNumber = random(0,1000);
if(randomNumber < 201){
randomNumber = 0;
}
for(i = 0; i <= randomNumber; i++){
switch (lcd_key){
case btnSELECT:{
cashedOut = true;
cashedOutMultiplier = current_multiplier;
break;
}}
lcd.clear();
lcd.print("BustaDuino"); // print a simple message on the LCD
lcd.setCursor(0, 1);
if(randomNumber > 0){
current_multiplier = current_multiplier + 0.01;
}else{
current_multiplier = 0;
}
lcd.print(String(current_multiplier) + "x");
Serial.print(String(current_multiplier) + "x");
lcd_key = read_LCD_buttons(); // read the buttons
if(i <= randomNumber && cashedOut == true){
lcd.clear();
lcd.print("You Win!");
lcd.setCursor(0, 1);
lcd.print(String(cashedOutMultiplier) + "x");
Serial.print(String(cashedOutMultiplier) + "x");
gameFinished = true;
break;
}else if(i >= randomNumber && cashedOut == false){
lcd.clear();
lcd.print("BUSTED!");
lcd.setCursor(0, 1);
lcd.print(String(current_multiplier) + "x");
Serial.print(String(current_multiplier) + "x");
gameFinished = true;
}
delay((time_to/i) * 3000);
}
}
}
示例4: StartSingle
void StartSingle() {
lcd.clear();
lcd.setCursor(1,0);
lcd.print("Get Ready in...");
delay(300);
for (int i=0; i<5; i++) {
lcd.setCursor(8,1);
lcd.print(5-i);
delay(1000);
}
lcd.clear();
lcd.setCursor(6,0);
lcd.print("GO!");
StartTimer();
}
示例5: setup
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.clear();
}
示例6: begin
void IntroScreen::begin( LiquidCrystal &_lcd ) {
_lcd.noBlink();
_lcd.clear();
_lcd.print("Time Lapse");
_lcd.setCursor(0, 1);
_lcd.print("Controller");
}
示例7: selectUser
//User is chosen, value between 1 and 5
void selectUser() {
userselected = 1;
int done = 0;
lcd.clear();
while(!done) {
printUser();
pressed = btnpressed();
switch (pressed) {
case UP :
if(userselected > 1) userselected--;
break;
case DOWN :
if(userselected < 5) userselected++;
break;
case SELECT :
done = 1;
break;
}
delay(500);
}
}
示例8: loop
void loop() {
lcd.clear();
lcd.print("http://powerpacks." );
lcd.setCursor( 0,1 );
lcd.print("ArcolaEnergy.com");
lcd.setCursor( 0,3 );
lcd.print(RTC.get(DS1307_HR,true)); //read the hour and also update all the values by pushing in true
lcd.print(":");
lcd.print(RTC.get(DS1307_MIN,false));//read minutes without update (false)
lcd.print(":");
lcd.print(RTC.get(DS1307_SEC,false));//read seconds
lcd.print(" "); // some space for a more happy life
lcd.print(RTC.get(DS1307_DATE,false));//read date
lcd.print("/");
lcd.print(RTC.get(DS1307_MTH,false));//read month
lcd.print("/");
lcd.print(RTC.get(DS1307_YR,false)); //read year
digitalWrite( STATUS_OK, HIGH);
digitalWrite( STATUS_BAD, LOW );
delay( 100 );
digitalWrite( STATUS_OK, LOW);
digitalWrite( STATUS_BAD, HIGH );
delay( 100 );
}
示例9: button_pressed
bool button_pressed() {
bool pressed = button.uniquePress();
if (pressed) {
lcd.clear();
}
return pressed;
}
示例10: printDateAndTime
void printDateAndTime(LiquidCrystal & lcd, Date & date, Time & time) {
lcd.clear();
lcd.setCursor(0,0);
date.print(lcd);
lcd.setCursor(0,1);
time.print(lcd);
}
示例11: loop
void loop() {
noLight=digitalRead(digitalSignal);//
lightness=analogRead(analogSignal); // и о его количестве
// set the cursor to column 0, line 1
lcd.setCursor(0, 0);
//вывод сообщения
Serial.print("There is ");
lcd.clear();
if (noLight) {
Serial.println("1");
lcd.print("1");
}
else {
Serial.println("0");
lcd.print("0");
}
Serial.print("value: ");
Serial.println(lightness);
lcd.setCursor(0, 1);
//clearLCD();
lcd.print(lightness);
delay(1000); //задержка 1 сек
}
示例12: loop
void loop() {
statoPulsante = digitalRead(6);
if(statoPulsante != precedenteStatoPulsante)
if (statoPulsante == LOW) {
risposta = random(8);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("La Palla dice:");
lcd.setCursor(0,1);
switch(risposta) {
case 0: lcd.print("Si"); break;
case 1: lcd.print("Molto probabilmente"); break;
case 2: lcd.print("Certamemte"); break;
case 3: lcd.print("Sembra di si"); break;
case 4: lcd.print("Insicuro"); break;
case 5: lcd.print("Domanda ancora"); break;
case 6: lcd.print("Molto dubbio"); break;
case 7: lcd.print("NO"); break;
};
};
precedenteStatoPulsante = statoPulsante;
}
示例13: setup
void setup()
{
RFID.begin(9600); // start serial to RFID reader
Serial.begin(9600); // start serial to PC
lcd.begin(16, 2);
//lcd output
lcd.clear();
lcd.print("There are "); //start printing the result
lcd.print(space_left); //then how many spaces
lcd.print(" spaces left."); //words
lcd.println(" "); //spaces
for (int i = 0; i < 5; i++)
{
id_marker[i] = 0;
}
Serial.println("Ready!");
//sets everything in the array equal to blank
for(int i=0; i<5; i++)
{
id_array[i] = String("");
}
}
示例14: clr
void clr(int delayTime) {
lcd.clear();
delay(20);
lcd.print(timeOutText);
delay(delayTime);
//lcd.print(".");
//delay(1000);
}
示例15: refrashScreen
void LcdHandler::refrashScreen(int menuPosittion, double *setParameters, Menu *menu)
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(menu->getItem(menuPosittion));
lcd.setCursor(0, 1);
lcd.print((int)setParameters[menuPosittion]);
}