Weblessons.org
Home Page | Language Reference| extended() | SD Reference | Libraries | Comparison | Changes
Robot
drawBMP()
Description
Display a bmp file on the LCD screen. The bmp file should be stored in sd card. BMP format should be 24-bit color, and no bigger than 128*160. If an image dimensions exceed the size of the screen, it 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.
Returns
none
Examples
// Draws an image named 'intro.bmp' from the SD card
#include <ArduinoRobot.h>
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
}
See also
Reference Home
The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.