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


C++ LiquidCrystal_I2C::clear方法代码示例

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


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

示例1: startWebServer

void startWebServer()
{
	server.listen(80);
	server.addPath("/", onIndex);
	server.addPath("/lcd", onLcd);
	server.addPath("/volume", onVolume);
	server.addPath("/mute", onMute);
	server.addPath("/source", onSource);
	server.addPath("/state", onState);
	server.addPath("/power", onPower);
	server.addPath("/tune", onTune);
	server.addPath("/mixing", onMixing);
	server.addPath("/enhance", onEnhance);
	
		// Web Sockets configuration
	server.enableWebSockets(true);
	server.setWebSocketConnectionHandler(wsConnected);
	server.setWebSocketMessageHandler(wsMessageReceived);
	server.setWebSocketBinaryHandler(wsBinaryReceived);
	server.setWebSocketDisconnectionHandler(wsDisconnected);

	
	server.setDefaultHandler(onFile);

	Serial.println("\r\n=== WEB SERVER STARTED ===");
	Serial.println(WifiStation.getIP());
    lcd.clear();
    lcd.setCursor(1,1);
	lcd.print(WifiStation.getIP());
}
开发者ID:avtehnik,项目名称:esp8266-music-box,代码行数:30,代码来源:application.cpp

示例2: init

void init()
{
	Serial.begin(SERIAL_BAUD_RATE);
	Serial.systemDebugOutput(true); // Allow debug print to serial
	Serial.println("Sming. Let's do smart things!");
	Wire.pins(2, 0);
	lcd.begin(16, 2);
	lcd.backlight();

	lcd.clear();
	lcd.setCursor(0, 0);
	lcd.print("DATE: 00/00/0000");
	lcd.setCursor(0, 1);
	lcd.print("TIME: 00:00");

	// Station - WiFi client
	WifiStation.enable(true);
	WifiStation.config(WIFI_SSID, WIFI_PWD); // Put you SSID and Password here

	// set timezone hourly difference to UTC
	SystemClock.setTimeZone(7);

	

	// Run our method when station was connected to AP (or not connected)
	WifiStation.waitConnection(connectOk, 30, connectFail); // We recommend 20+ seconds at start
}
开发者ID:db4linq,项目名称:SystemClock_NTP,代码行数:27,代码来源:application.cpp

示例3: setPressure

void setPressure() {
	lcd.clear();
	lcd.print("Baromethric");
	lcd.setCursor(0, 1);
	lcd.print("10000");
	lcd.print(" kPa");
}
开发者ID:kjetilfjellheim,项目名称:arduino_experiments,代码行数:7,代码来源:Senser.cpp

示例4: echoSerial

void echoSerial(){
 byte index=0;
 char outa[20];
 char outb[20];
 outb[0]='\0';
 boolean foundData=false;
 while (Serial.available() > 0){
   foundData=true;
   if(index < 19){
     outa[index]=Serial.read();
     index++;
     outa[index]= '\0'; 
   }else{ 
     if(index < 39){
       outb[index-20]=Serial.read();
       index++;
       outb[index-20]= '\0';
     }
   }
 }
 if(foundData){
   lcd.clear();
   lcd.home();
   lcd.print(outa);
   lcd.setCursor ( 0, 1 );
   lcd.print(outb);
 }
}
开发者ID:edboel,项目名称:projects,代码行数:28,代码来源:temp_serial1.c

示例5: setHumidity

void setHumidity() {
	float newHumidity = dht.readHumidity();
	lcd.clear();
	lcd.print("Humidity");
	lcd.setCursor(0, 1);
	lcd.print(newHumidity);
	lcd.print(" %");
}
开发者ID:kjetilfjellheim,项目名称:arduino_experiments,代码行数:8,代码来源:Senser.cpp

示例6: setTemperature

void setTemperature() {
	float newTemperature = dht.readTemperature(false);
	lcd.clear();
	lcd.print("Temperature");
	lcd.setCursor(0, 1);
	lcd.print(newTemperature);
	lcd.print(" C");
}
开发者ID:kjetilfjellheim,项目名称:arduino_experiments,代码行数:8,代码来源:Senser.cpp

示例7: navigationReturnHome

void navigationReturnHome()
{
  navigationSounds->play( soundUhoh );
  currentNavigationDestination = currentNavigationHome;
  lcd.clear();
  lcd.print( "Returning home!" );

  lcd.setCursor(0, 2); lcd.print( "Next stop:" );
  lcd.setCursor(0, 3); lcd.print( destinationList[currentNavigationHome] );
}
开发者ID:robotgeek,项目名称:geekbot,代码行数:10,代码来源:Navigation.cpp

示例8: loop

void loop() {
  int value = analogRead(TEMP_PIN);
  float celsius = ((value * 5.0) / 1024.0 - 0.5) * 100;
  float fahrenheit = (celsius * 9.0 / 5.0) + 32.0;
  String temperatureCelsius = String(celsius);
  String temperatureFahrenheit = String(fahrenheit);

  lcd.clear();
  lcd.print(temperatureCelsius);
  lcd.print(" degrees C");
  lcd.setCursor(0, 1);
  lcd.print(temperatureFahrenheit);
  lcd.print(" degrees F");

  delay(5000);
}
开发者ID:senfo,项目名称:ScratchPad,代码行数:16,代码来源:SainSmartLCD.c

示例9: step1

int step1()
{
    //Wait for GPS
    lcd.clear();
    lcd.println(F("Looking for GPS"));
    lcd.setCursor(0, 1);
    char str[32];
    sprintf(str,"view:%2d  fix:%2d", sats_view, sats_fix);
    lcd.print(str);

    delay(1000);

    if(millis() > sleep_time + 300000) digitalWrite(ON_PIN, 0);
    if(gps_fix == 3) return 1;
    else return 0;
}
开发者ID:vvranjek,项目名称:questbox,代码行数:16,代码来源:QwestBox.cpp

示例10: goSleep

void DisplayClass::goSleep()
{
	lcd.clear();
	lcd.home();
	lcd.print(F("Low Power Mode"));
	lcd.setCursor(0, 1);
	lcd.print(F("Going to sleep in:"));
	lcd.setCursor(0, 2);
	lcd.print(F("3"));
	DELAY_FUNC(333);
	for (uint8_t i = 0; i < 3; i++)
	{
		lcd.print(F("."));
		DELAY_FUNC(333);

	}

	lcd.print(F("2"));
	DELAY_FUNC(333);
	for (uint8_t i = 0; i < 3; i++)
	{
		lcd.print(F("."));
		DELAY_FUNC(333);

	}

	lcd.print(F("1"));
	DELAY_FUNC(333);
	for (uint8_t i = 0; i < 3; i++)
	{
		lcd.print(F("."));
		DELAY_FUNC(333);

	}
	lcd.print(F("0!"));
	DELAY_FUNC(333);

	for (uint8_t i = 0; i < 3; i++)
	{
		noBacklight();
		DELAY_FUNC(500);
		backlight();
		DELAY_FUNC(500);

	}
}
开发者ID:sn4k3,项目名称:WaterDispenser,代码行数:46,代码来源:Display.cpp

示例11: navigationCheckLocation

bool navigationCheckLocation()
{
  while ( currentNavigationLocation < 0 )
  {
    lcd.clear();
    lcd.print( "Where am I starting?" );
    lcdSelectLocation();

    while ( digitalRead(LCD_UP_PIN) == HIGH || digitalRead(LCD_DOWN_PIN) == HIGH || digitalRead(LCD_PLAY_PIN) == HIGH )
    {
      if ( digitalRead(LCD_UP_PIN) == LOW )
      {
        navigationSounds->play( soundUp );
        if ( --lcdCurrentSelection < 0 ) lcdCurrentSelection = MAP_LOCATION_COUNT - 1;
        delay(250); //debounce time
        break;
      }
      if ( digitalRead(LCD_DOWN_PIN) == LOW )
      {
        navigationSounds->play( soundDown );
        if ( ++lcdCurrentSelection == MAP_LOCATION_COUNT ) lcdCurrentSelection = 0;
        delay(250); //debounce time
        break;
      }
      if ( digitalRead(LCD_PLAY_PIN) == LOW )
      {
        navigationSounds->play( soundUhoh );
        currentNavigationLocation = lcdCurrentSelection;
        currentNavigationHome = lcdCurrentSelection;

        /*
        Serial.print( "Current Location: " );
        Serial.print( currentNavigationLocation );
        Serial.print( ": " );
        Serial.println( destinationList[currentNavigationLocation] );
        */

        delay(250); //debounce time
        break;
      }
    }
    return false;
  }
  return true;
}
开发者ID:robotgeek,项目名称:geekbot,代码行数:45,代码来源:Navigation.cpp

示例12: updatelcd

void updatelcd() 
{
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("XT");
  lcd.setCursor(3,0);
  lcd.print(_XEncoderTicks);
  lcd.setCursor(10,0);
  lcd.print("XI");
  lcd.setCursor(13,0);
  lcd.print(_XEncoderIndex);
  lcd.setCursor(18,0);
  lcd.print("X");
  lcd.setCursor(19,0);
  lcd.print(">" + _XMinPinSet);
  lcd.setCursor(17,0);
  lcd.print("<" + _XMaxPinSet);
  
  lcd.setCursor(0,1);
  lcd.print("YI");
  lcd.setCursor(3,1);
  lcd.print(_YEncoderTicks);
  lcd.setCursor(10,1);
  lcd.print("YI");
  lcd.setCursor(13,1);
  lcd.print(_YEncoderIndex);
  lcd.setCursor(18,1);
  lcd.print("Y");
  lcd.setCursor(19,1);
  lcd.print("V" + _YMinPinSet);
  lcd.setCursor(17,1);
  lcd.print("^" + _YMaxPinSet);
  /*
  lcd.setCursor(15,0);
  lcd.print(_XCsens);*/
  lcd.setCursor(3,3);
  lcd.print("<" + _XJoyLeft);
  lcd.setCursor(5,3);
  lcd.print(">" + _XJoyRight);
  lcd.setCursor(4,3);
  lcd.print("^" + _YJoyUp);
  lcd.setCursor(4,3);
  lcd.print("V" + _YJoyDown);
  delay(20);
}
开发者ID:sgawad,项目名称:Teacup_Firmware,代码行数:45,代码来源:Main.cpp

示例13: connectOk

void connectOk()
{
	debugf("connected");
	WifiAccessPoint.enable(false);
	lcd.clear();
	lcd.print("\7 ");
	lcd.print(WifiStation.getIP().toString());
	// Restart main screen output
	procTimer.restart();
	displayTimer.stop();

	startWebClock();
	// At first run we will download web server content
	if (!fileExist("index.html") || !fileExist("config.html") || !fileExist("api.html") || !fileExist("bootstrap.css.gz") || !fileExist("jquery.js.gz"))
		downloadContentFiles();
	else
		startWebServer();
}
开发者ID:BorntraegerMarc,项目名称:Sming,代码行数:18,代码来源:application.cpp

示例14: close_box

void close_box(){
    lcd.clear();
    lcd.print(F("  Locking box  "));
    Serial.println(F("Locking box"));
   // servo.attach(SERVO_PIN);
    digitalWrite(SERVO_ON_PIN, 1);
    delay(5000);
    servo.write(DOOR_CLOSED);


    delay(1000);




   // delay(5000);
    //servo.detach();
    digitalWrite(SERVO_ON_PIN, 0);
}
开发者ID:vvranjek,项目名称:questbox,代码行数:19,代码来源:QwestBox.cpp

示例15: connectFail

void connectFail()
{
	debugf("connection FAILED");
	WifiAccessPoint.config("MeteoConfig", "", AUTH_OPEN);
	WifiAccessPoint.enable(true);
	// Stop main screen output
	procTimer.stop();
	displayTimer.stop();
	lcd.clear();

	lcd.setCursor(0,0);
	lcd.print("WiFi MeteoConfig");
	lcd.setCursor(0,1);
	lcd.print("  ");
	lcd.print(WifiAccessPoint.getIP());

	startWebServer();
	WifiStation.waitConnection(connectOk); // Wait connection
}
开发者ID:BorntraegerMarc,项目名称:Sming,代码行数:19,代码来源:application.cpp


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