Arduino Function: RobotControl.drawBMP

Description

This function is used to display a bmp file on the LCD screen. The bmp file should be stored on SD Card. BMP format should be 24-bit color, and no bigger than 128*160. Bigger images will be cropped. To use this method, you must initialize the SD card by calling Robot.beginSD() in setup().

Syntax

Robot.drawBMP(filename, x, y)

Parameters

filename: name of the bmp file to be displayed. *x: x-axis of starting position on the screen. *y: y-axis of starting position on the screen.

Examples

// Draws an image named "intro.bmp" from the SD card

#include 

void setup(){
 Robot.begin();
 Robot.readyTFT();
 Robot.beginSD();

 //The image is pulled from sd card
 Robot.drawBMP("intro.bmp",0,0);
}

void loop(){
 // nothing happening here
}


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc