本文整理汇总了C++中LiquidCrystal_I2C::write方法的典型用法代码示例。如果您正苦于以下问题:C++ LiquidCrystal_I2C::write方法的具体用法?C++ LiquidCrystal_I2C::write怎么用?C++ LiquidCrystal_I2C::write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LiquidCrystal_I2C
的用法示例。
在下文中一共展示了LiquidCrystal_I2C::write方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: robot_command
//.........这里部分代码省略.........
}
}
else if (motor_state == STATE_GO)
{
Serial.print("CMD_TURN, alpha: "); Serial.print((cmd[2] != 1) ? ('+'):('-')); Serial.println((int)cmd[1]);
lcd.print("TURN"); lcd.print((cmd[2] != 1) ? ('+'):('-')); lcd.print((int)cmd[1]);lcd.print((char)223); //degree
ret = turn ((double)((cmd[2] != 1) ? (cmd[1]):(-cmd[1])), 5); // 5s max
if (ret != SUCCESS){
Serial.print("turn error"); Serial.println(ret);
lcd.setCursor(0,1);
lcd.print(" turn error: "); lcd.print(ret);
error = 1;
}
}
*resplen = 0;
break;
case CMD_INFOS:
Serial.println("CMD_INFOS");
ret = infos (resp, &infolen);
if (resp[MOTOR_STATE] == STATE_GO) {
lcd.print("RUNING");
}
else
{
lcd.print("STOPPED");
}
lcd.setCursor(0,1);
lcd.print((int)resp[TEMPERATURE]); lcd.print((byte)lcd_celcius);lcd.write(lcd_pipe);
lcd.print((int)resp[DISTANCE]); lcd.print("cm");lcd.write(lcd_pipe);
lcd.print((int)resp[DIRECTION]); lcd.print((char)223); //degree
*resplen = infolen;
break;
case CMD_PICTURE:
Serial.print("CMD_PICTURE, no_picture: ");
no_picture++;
Serial.println(no_picture);
lcd.print("PICTURE ");
motor_state_save = motor_state;
if (motor_state == STATE_GO) {
Serial.println("Stop");
stop();
motor_state = STATE_STOP;
}
ret = JPEGCamera.makePicture (no_picture);
if (ret == SUCCESS)
{
lcd.setCursor(0,1);
lcd.print("picture: "); lcd.print(no_picture);
}
else
{
Serial.print("makePicture error: "); Serial.println(ret);
lcd.setCursor(0,1);
lcd.print("error: "); lcd.print(ret);
error = 1;
}