Hey all just a quick question regarding a tft display, I've spent hours googling without much luck.
For a long time I've been using seeedstudio 2.8 inch displays which are a doddle to use however I bought a Waveshare 2.8 inch thinking it would be a drop in replacement at far lower cost, obviously a big mistake.
I have got the Waveshare display to work by installing the HX8347_kbv library (prenticedavid version), drawing shapes is easy but I need to display numbers, text and floats which on the Seeedstudio device is really straight forward using the TFT V2.0 library. This library sadly does not work on the Waveshare.
I cant find any information or reference to commands for the HX8347D library which is really frustrating.
I'm currently limited to drawing a single string to the screen as per the included example i.e
Tft.lcd_display_string(60, 120, (const uint8_t *)"Hello, world !", FONT_1608, RED);
Obviously '60 and 120' are the co ordinates,' Hello world' is the string to be printed and 'RED' the text colour.
I guess I will be stuck with only printing strings to the screen so will need to convert ints and floats to strings but cant figure any way of changing the text size.
The 'const uint8_t *' is clearly an unsigned int I'm assuming this is what sets the text size somehow?
If 'FONT_1608' is the font type I'm guessing there are several fonts at my disposal?
Here is the example sketch in full
#include <stdint.h>
#include <HX8347D.h>
#include <SPI.h>
void setup()
{
SPI.setDataMode(SPI_MODE3);
SPI.setBitOrder(MSBFIRST);
SPI.setClockDivider(SPI_CLOCK_DIV4);
SPI.begin();
Tft.lcd_init(); // init TFT library
Tft.lcd_clear_screen(BLUE);
Tft.lcd_display_string(60, 120, (const uint8_t *)"Hello, world !", FONT_1608, RED);
Tft.lcd_display_string(30, 152, (const uint8_t *)"2.8' TFT Touch Shield", FONT_1608, RED);
}
void loop()
{
}
/*********************************************************************************************************
END FILE
************