1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

TFT library: warning messages in PImage class and strings inside examples now stored in flash to save RAM

This commit is contained in:
Fede85
2013-12-06 11:17:17 +01:00
parent 9b05911525
commit 9a50f9f1fa
4 changed files with 26 additions and 23 deletions

View File

@ -50,10 +50,10 @@ void setup() {
TFTscreen.stroke(0, 0, 255);
TFTscreen.println();
TFTscreen.println("Arduino TFT Bitmap Example");
TFTscreen.println(F("Arduino TFT Bitmap Example"));
TFTscreen.stroke(0, 0, 0);
TFTscreen.println("Open serial monitor");
TFTscreen.println("to run the sketch");
TFTscreen.println(F("Open serial monitor"));
TFTscreen.println(F("to run the sketch"));
// initialize the serial port: it will be used to
// print some diagnostic info
@ -67,12 +67,12 @@ void setup() {
// try to access the SD card. If that fails (e.g.
// no card present), the setup process will stop.
Serial.print("Initializing SD card...");
Serial.print(F("Initializing SD card..."));
if (!SD.begin(sd_cs)) {
Serial.println("failed!");
Serial.println(F("failed!"));
return;
}
Serial.println("OK!");
Serial.println(F("OK!"));
// initialize and clear the GLCD screen
TFTscreen.begin();
@ -82,7 +82,7 @@ void setup() {
// image file.
logo = TFTscreen.loadImage("arduino.bmp");
if (!logo.isValid()) {
Serial.println("error while loading arduino.bmp");
Serial.println(F("error while loading arduino.bmp"));
}
}
@ -92,7 +92,7 @@ void loop() {
return;
}
Serial.println("drawing image");
Serial.println(F("drawing image"));
// get a random location where to draw the image.
// To avoid the image to be draw outside the screen,