Go Down

Topic: [LCD TFT] Compilation failed - SOLVED (Read 1 time) previous topic - next topic

_Klaatu_

Jan 26, 2015, 01:06 pm Last Edit: Jan 26, 2015, 02:06 pm by _Klaatu_
Hello,

Im trying to work with the LCD module/SD card reader Arduino.
Ive made the LCD work after a lot of problem. The solution I found was to use the nightly built arduino. ANyway, my LCD works well, and I can display texts.

I wanted to display an image from the SD card.
This is my code

Code: [Select]
#include <TFT.h>
#include <SPI.h>
#include <SD.h>

#define cs 10
#define dc 9
#define rst 8

TFT screen = TFT(cs,dc,rst);
PImage logo;

void setup()
{
 screen.begin();
  SD.begin(4);

 logo = screen.loadImage("image.bmp");
 screen.image(pic,0,0);
}

void loop()
{}


This is the error

Code: [Select]
Arduino: 1.6.0 (Windows 7), Board: "Arduino Uno"

test1.ino:10:1: error: 'PImage' does not name a type
test1.ino: In function 'void setup()':
test1.ino:18:1: error: 'logo' was not declared in this scope
test1.ino:18:15: error: 'class TFT' has no member named 'loadImage'
Error compiling.


I've tried to find any solution on the internet but I can't solve that.
Ive tried with different versions of the software: 1.5.8, 1.06 and the nightly

_Klaatu_

#1
Jan 26, 2015, 01:48 pm Last Edit: Jan 26, 2015, 02:06 pm by _Klaatu_
I've found something reading the source file.
I don't have any compilation error if I declare the SD.h before the TFT.h.

Its all good, all is working !

thanks for reading tho :)

Go Up