1、设置screenimage(image, xPos, yPos);的参数:
image : a named instance of PImage
xPos : int, location on the x-axis to start drawing
yPos : int, location on the y-axis to start drawing
2、举例说明:
PImage logo;
void setup() {
// initialize the screen
EsploraTFTbegin();
// initialize the SD card
SDbegin(SD_CS);
// set the background the black
EsploraTFTbackground(0, 0, 0);
// load the image into the named instance of PImage
logo = EsploraTFTloadImage("arduinobmp");
// if it is a valid image file, turn the Esplora's LED green
if (logoisValid()) {
EsplorawriteGreen(255);
}
else{
// if it is not valid, turn the LED red
EsplorawriteRed(255);
}
// draw the image on the screen starting at the top left corner
EsploraTFTimage(logo, 0, 0);
}
void loop() {
//循环处理另一个网页上的,存放到本网页的固定位置
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)