本文整理汇总了C++中Adafruit_ILI9341::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ Adafruit_ILI9341::begin方法的具体用法?C++ Adafruit_ILI9341::begin怎么用?C++ Adafruit_ILI9341::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Adafruit_ILI9341
的用法示例。
在下文中一共展示了Adafruit_ILI9341::begin方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setup
void setup(void) {
Serial.println(F("Touch Paint!"));
tft.begin();
if (!ts.begin()) {
Serial.println("Couldn't start touchscreen controller");
while (1);
}
Serial.println("Touchscreen started");
tft.fillScreen(ILI9341_BLACK);
// make the color selection boxes
tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED);
tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW);
tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN);
tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN);
tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE);
tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA);
// select the current color 'red'
tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
currentcolor = ILI9341_RED;
}
示例2: setup
void setup() {
Serial.begin(38400);
Serial.println("handset");
tft.begin();
tft.fillScreen(ILI9341_BLACK);
setupLog();
radio = new CC1101Radio();
radio->listen(onMessageReceived);
pipe = new Pipeline();
pipe->segueTo(new DashboardViewController());
}
示例3: init_TFT
/************************************
* Name : init_TFT
* Purpuse : Init TFT module
* Inputs : None
* Outputs : None
* Returns : None
************************************/
void init_TFT()
{
tft.begin();
Serial.println("ILI9341 Begin");
// read diagnostics (optional but can help debug problems)
uint8_t x = tft.readcommand8(ILI9341_RDMODE);
Serial.print("Display Power Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDMADCTL);
Serial.print("MADCTL Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDPIXFMT);
Serial.print("Pixel Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDIMGFMT);
Serial.print("Image Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDSELFDIAG);
Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX);
} //init_TFTcreen
示例4: setup
void setup() {
Serial.begin(9600);
Serial.println("ILI9341 Test!");
tft.begin();
tft.fillScreen(ILI9341_BLACK);
}