Arduino

Reference Language | 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
}
[Get Code]

#### See also

- beginTFT()
- text()
- debugPrint()

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

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.

### Share

### This link has expired.
Please re-subscribe to our Newsletters.

### Subscribe to our Newsletters

Email

Please enter a valid email to subscribe

Arduino Newsletter
Arduino Store Newsletter

### Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy

###### Newsletter

- ©2015 Arduino
- Copyright Notice
- Contact us
- Careers