Reference.RobotDrawBMP History

Hide minor edits - Show changes to markup

May 17, 2013, at 06:04 PM by David Cuartielles -
Changed line 33 from:
  Robot.readyLCD();
to:
  Robot.readyTFT();
Changed line 48 from:
to:
May 15, 2013, at 10:01 AM by Scott Fitzgerald -
Deleted line 31:
  Serial.begin(9600);
May 15, 2013, at 10:01 AM by Scott Fitzgerald -
Changed lines 17-22 from:

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.

to:
  • 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.
May 03, 2013, at 11:23 AM by Xun Yang -
Changed lines 1-2 from:
to:
May 01, 2013, at 04:16 PM by Xun Yang -
Deleted line 39:
  Robot.fillScreen(BLACK);
May 01, 2013, at 02:05 PM by Xun Yang -
Changed lines 7-12 from:

Display a bmp file on the LCD screen. Files be stored either in the EEPROM or on a SD card. Images 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.

For speed reasons, it's recommended to read images from a SD card. You must initialize the SD card by calling Robot.beginSD() in setup(). drawBMP() reads a file from the SD card by default.

Images can also be stored in the EEPROM. Reading from EEPROM is much slower than using a SD card. To draw from an image in EEPROM, you must call beginBMPFromEEPROM() before drawBMP(), and endBMPFromEEPROM() afterwards.

to:

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().

Changed lines 29-32 from:

// Draws an image from EEPROM named "inicioEEPROM.bmp" // clears the screen after one second, and draws an // image named "inicioSD.bmp" from the SD card

to:

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

Changed lines 37-45 from:
  Robot.beginSD();  //Necessary if the image is stored in sd card

  //The image is pulled from EEPROM
  Robot.beginBMPFromEEPROM();
  Robot.drawBMP("inicioEEPROM.bmp",0,0);
  Robot.endBMPFromEEPROM();

  delay(1000);
to:
  Robot.beginSD();
Changed line 41 from:
  Robot.drawBMP("inicioSD.bmp",0,0);
to:
  Robot.drawBMP("intro.bmp",0,0);
Deleted lines 54-55:
April 14, 2013, at 01:26 PM by Scott Fitzgerald -
Changed lines 1-2 from:

drawBMP(filename, x, y)

to:

Robot?

drawBMP()

Changed lines 7-8 from:

Display a bmp file on the LCD screen

to:

Display a bmp file on the LCD screen. Files be stored either in the EEPROM or on a SD card. Images 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.

For speed reasons, it's recommended to read images from a SD card. You must initialize the SD card by calling Robot.beginSD() in setup(). drawBMP() reads a file from the SD card by default.

Images can also be stored in the EEPROM. Reading from EEPROM is much slower than using a SD card. To draw from an image in EEPROM, you must call beginBMPFromEEPROM() before drawBMP(), and endBMPFromEEPROM() afterwards.

Syntax

Robot.drawBMP(filename, x, y)

Changed lines 19-20 from:

filename: name of the bmp file to be displayed. Can either be stored in the EEPROM or sd card.

to:

filename: name of the bmp file to be displayed.

Changed lines 30-34 from:
to:
Added line 36:
Changed line 45 from:
  Robot.drawBMP("inicio.bmp",0,0);
to:
  Robot.drawBMP("inicioEEPROM.bmp",0,0);
Changed line 52 from:
  Robot.drawBMP("inicio.bmp",0,0);
to:
  Robot.drawBMP("inicioSD.bmp",0,0);
Added line 54:
Added line 56:
  // nothing happening here
Changed lines 60-67 from:

Note

The screen size is 128*160, image will be cropped if it's beyond the screen.

It's recommended to draw images from the sd card only. The bmp files should be 24-bit, and no bigger than 128*160. Remember to call Robot.beginSD() to initialize the sd card.

Some images are stored in the EEPROM, which are accessible even if you don't have them in sd card. It's much slower than using sd card though. See the example above and beginBMPFromEEPROM(), endBMPFromEEPROM() for details.

to:
Changed line 67 from:
to:
April 11, 2013, at 09:01 PM by Xun Yang -
Added lines 1-57:

Share