#include "SPI.h"
#include "Wire.h"
#include "FT_VM800P43_50.h"
sTagXY sTagxy;
FT800IMPL_SPI FTImpl(10, 4, 3);
int16_t BootupConfigure()
{
uint32_t chipid = 0;
FTImpl.Init(FT_DISPLAY_WQVGA_480x272);//configure the display to the WQVGA
delay(20);
chipid = FTImpl.Read32(FT_ROM_CHIPID);
if(FT800_CHIPID != chipid)
{
Serial.print("Error in chip id read ");
Serial.println(chipid,HEX);
return 1;
}
FTImpl.SetDisplayEnablePin(FT_DISPENABLE_PIN);
FTImpl.DisplayOn();
return 0;
}
void Calibrate()
{
FTImpl.DLStart();
FTImpl.ClearColorRGB(102, 179, 26);
FTImpl.Clear(1,1,1);
FTImpl.ColorRGB(0xff, 0xff, 0xff);
FTImpl.Cmd_Text((FT_DISPLAYWIDTH/2), (FT_DISPLAYHEIGHT/2), 27, FT_OPT_CENTER, "Please press in the middle of circles");
FTImpl.Cmd_Calibrate(0);
FTImpl.Finish();
}
void HelloWorld(int tagoption)
{
const char Display_string[12] = "Hello World";
FTImpl.DLStart();
FTImpl.ColorRGB(0xFF,0xFF,0xFF);
FTImpl.Cmd_Text(FT_DISPLAYWIDTH/2, FT_DISPLAYHEIGHT/2, 29, FT_OPT_CENTER, Display_string);
FTImpl.Tag(12);
FTImpl.Cmd_Button((FT_DISPLAYWIDTH/4) - (50), (FT_DISPLAYHEIGHT*2/4) - (20), 100, 20, 26, tagoption, "Tag12");
FTImpl.DLEnd();
FTImpl.Finish();
}
void setup()
{
Serial.begin(9600);
Serial.println("--Start Application--");
if(BootupConfigure())
{
Calibrate();
}
else
{
void HelloWorld();
}
Serial.println("--End Application--");
}
void loop()
{
int tagval = sTagxy.tag;
int tagoption = 0;
if(12 == tagval)
{
tagoption = FT_OPT_FLAT;
HelloWorld(tagoption);
}
else
{
tagoption = 0;
HelloWorld(tagoption);
}
}
do anyone have any idea why this program cant be compiled for Arduino Uno/Genuine board?
i'm sure about the libraries I've used
and I can upload them if needed