Grumpy_Mike:
I searched through the code in the sketches of all the TFT examples and none use any clear screen command.
Get the Adafruit_SSD1306 library and run the ssd1306_128x64_spi or the ssd1306_128x64_i2c example sketch, I think that is what you are missing.
So I got the Adafruit_SSD1306 library and installed it, made sure to #include the two ( #include <Adafruit_GFX.h>, #include <Adafruit_SSD1306.h>)
I loaded the ssd1306_128x64_spi example up and saw the "display.clearDisplay(); " command in there so i figured since I have the library installed and its included now I should have access to that command?
But I still get.. error: 'display' was not declared in this scope
And whats funny on top of it when I open up the ssd1306_128x64_spi amd try to just verify it I get an error "ssd1306_128x64_spi:335: error: 'class Adafruit_SSD1306' has no member named 'println'" even though its their example.
So after installing it my sketch is as follows.
"#include <stdint.h>
#include <TouchScreen.h>
#include <TFT.h>
#include <TFT_Graphics.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#ifdef SEEEDUINO
#define YP A2 // must be an analog pin, use "An" notation!
#define XM A1 // must be an analog pin, use "An" notation!
#define YM 14 // can be a digital pin, this is A0
#define XP 17 // can be a digital pin, this is A3
#endif
#ifdef MEGA
#define YP A2 // must be an analog pin, use "An" notation!
#define XM A1 // must be an analog pin, use "An" notation!
#define YM 54 // can be a digital pin, this is A0
#define XP 57 // can be a digital pin, this is A3
#endif
void setup()
{
Tft.init(); //init TFT library
Tft.drawString("SCAN INITAITED",0,0,2,RED);
delay(3000);
Tft.drawString("----------7657566470808106647",0,20,1,WHITE);
delay(2000);
Tft.drawString("==============476445070416616" ,0,30,1,WHITE);
delay(2000);
Tft.drawString("Possible Match " ,0,40,2, RED);
delay (4000);
Tft.drawString("----------------76466013131",0,60,1,WHITE);
delay(2000);
Tft.drawString("------------------267790997",0,70,1,WHITE);
delay (2000);
Tft.drawString("----------------------90997",0,80,1,WHITE);
delay (2000);
Tft.drawString("-------------------------97",0,90,1,WHITE);
Tft.drawString("WARNING",0,100,2,RED);
Tft.drawString("!!!10,120,2,RED);
delay (3000);
Tft.drawString("PROX SENSOR",0,140,2,RED);
Tft.drawString("VER 2.2 !ON!" ,0,155,2,RED);
delay(500);
display.clearDisplay();
}
void loop()
{
}
"
am I using the command wrong? or in the wrong spot?
thanks so much mike for all your help