本文整理汇总了C++中Adafruit_RGBLCDShield::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ Adafruit_RGBLCDShield::begin方法的具体用法?C++ Adafruit_RGBLCDShield::begin怎么用?C++ Adafruit_RGBLCDShield::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Adafruit_RGBLCDShield
的用法示例。
在下文中一共展示了Adafruit_RGBLCDShield::begin方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setup
void LCDScreen::setup() {
lcd.begin( 16, 2 );
lcd.home();
lcd.print( "PCR V.2 - O.V.L.");
lcd.setCursor( 0, 1 );
lcd.print( "SELECT to cont." );
waitForSelect();
delay( 500 );
setUserInputs();
delay( 500 );
}
示例2: main
int main(int argc, char *argv[])
{
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
lcd.begin(16, 2);
lcd.setBacklight(RED);
lcd.clear();
lcd.home();
lcd.setCursor(0,0);
lcd.myPrint("Hello World");
int count = 0;
for(int i = 0; i < 20; i++){
usleep(300000);
if(count < 5){
lcd.scrollDisplayRight();
}
count++;
if(count > 5){
lcd.scrollDisplayLeft();
}
if(count > 9) count = 0;
}
uint8_t buttons = lcd.readButtons();
while(!(buttons & BUTTON_SELECT)){
if (buttons) {
if (buttons & BUTTON_LEFT) {
lcd.scrollDisplayLeft();
lcd.setBacklight(GREEN);
}
if (buttons & BUTTON_RIGHT) {
lcd.scrollDisplayRight();
lcd.setBacklight(TEAL);
}
}
buttons = lcd.readButtons();
usleep(90000);
}
return 0;
}
示例3: clear
void K3NGdisplay::initialize(){
lcd.begin(display_columns, display_rows); // if you are getting an error on this line and do not have
// any of the LCD display features enabled, remove
// k3ngdisplay.h and k3ngdisplay.cpp from your ino directory
#ifdef FEATURE_YOURDUINO_I2C_LCD
lcd.setBacklightPin(BACKLIGHT_PIN, POSITIVE);
lcd.setBacklight(I2C_LCD_COLOR);
#endif // FEATURE_YOURDUINO_I2C_LCD
#ifdef FEATURE_ADAFRUIT_I2C_LCD
lcd.setBacklight(I2C_LCD_COLOR);
#endif // FEATURE_ADAFRUIT_I2C_LCD
clear();
}
示例4: lcd_setup
void lcd_setup()
{
// set up the LCD's number of rows and columns:
lcd.begin(LCD_COLUMNS, LCD_ROWS);
lcd.setBacklight(BLUE);
}