lightcalamar / gd23z Goto Github PK
View Code? Open in Web Editor NEWLibrary for screen FT810, FT811, FT812 and FT813 based on library Gameduino 2/3
Home Page: https://ft81xmania.com/cominidad/
License: BSD 3-Clause "New" or "Revised" License
Library for screen FT810, FT811, FT812 and FT813 based on library Gameduino 2/3
Home Page: https://ft81xmania.com/cominidad/
License: BSD 3-Clause "New" or "Revised" License
fatal error: SdFat.h: No such file or directory
Hi,
When I try to load jpg file I only get the red screen.
I'm using UNO+Riverdi_arduino_tft board+Riverdi 7" FT813 touch screen
My code is:
void setup()
{
Serial.begin(9600);
GD.begin();
//GD.self_calibrate();
GD.cmd_loadimage(0,0);
GD.load("sunrise.jpg");
}
void loop()
{
GD.Clear();
GD.Begin(BITMAPS);
GD.BitmapSize(NEAREST, BORDER, BORDER, 64, 64);
GD.Vertex2ii(0, 0);
GD.swap();
}
I've enabled debug mode and in serial terminal I can see this:
Sending card init command
1
1
0
OK
OCR=2164228096 80FF8000
OCR=2164228096 80FF8000
OCR=2164228096 80FF8000
OCR=2164228096 80FF8000
OCR=2164228096 80FF8000
OCR=2164228096 80FF8000
OCR=2164228096 80FF8000
OCR=2164228096 80FF8000
OCR=2164228096 80FF8000
OCR=2164228096 80FF8000
ccs=0 0
type_code=11 B
sectors_per_cluster=32 20
finished
My SD card is fat16. I've tried with both fat16 and fat32 enabled in GD23Z.h file.
I can display buttons, shapes, progress bars without any problems, but whenever I try to display jpg I get red screen.
What could be the reason?
STM32 has EEPROM emulation.
So i change this code
[Current]
#if defined(ARDUINO_ARCH_STM32)
//FT81XMANIA TEAM (@lightcalamar)
///////////////////////////////////////////////////////////////////////////////////////////////////////
AT24Cxx eep(i2c_address, 32);
if (eep.read(0) != 0x7c) {
self_calibrate();
for (int i = 0; i < 24; i++)
eep.write(1 + i, GDTR.rd(REG_TOUCH_TRANSFORM_A + i));
eep.write(0, 0x7c); // is written!
} else {
for (int i = 0; i < 24; i++)
GDTR.wr(REG_TOUCH_TRANSFORM_A + i, eep.read(1 + i));
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
//FT81XMANIA TEAM (@lightcalamar)
#endif
[Edit]
#if defined(__STM32F1__)
uint16 Status;
uint16_t Data;
Status = EEPROM.read(0x10,&Data);
Serial.print("Data.EEPROM[10]=");
Serial.println(Data,HEX);
if (Data != 0x7c) {
self_calibrate();
for (int i = 0; i < 24; i++) {
Data = GDTR.rd(REG_TOUCH_TRANSFORM_A + i);
Serial.print("Data.rd[" + String(i) + "=");
Serial.println(Data, HEX);
EEPROM.write(0x20 + i, Data);
}
EEPROM.write(0x10, 0x7c); // is written!
} else {
for (int i = 0; i < 24; i++) {
Status=EEPROM.read(0x20+i,&Data);
Serial.print("Data.EEPROM[=" + String(i) + "]=");
Serial.println(Data,HEX);
GDTR.wr(REG_TOUCH_TRANSFORM_A + i, Data);
}
}
#endif
Thank you for your great work.
This define is not valid for Arduino_STM32 core.
https://github.com/rogerclarkmelbourne/Arduino_STM32
Check this code using Arduino_STM32 core.
#if defined(ARDUINO_ARCH_STM32)
#define MODEL "ARDUINO_ARCH_STM32"
#elif defined(STM32)
#define MODEL "STM32"
#else
#define MODEL "NONE"
#endif
void setup() {
delay(1000);
Serial.begin(9600);
Serial.println(MODEL);
}
void loop() {
// put your main code here, to run repeatedly:
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.