My second post. I am having issues trying to get my program to compile. I am unable to find an example of this working on a particle/argon. The errors are so numerous that its probably best if someone has a simple example than to try to sort this out. I have been able to get the tft to display text and draw lines, etc… but can’t seem to get a bmp from the sdcard to display. I have tried numerous libraries, of course i included the gfx_RK,and the HX3857_RK which worked for the text and drawing lines… i added SDfat and imageReader libraries and then the trouble started.
Yes, that was a typo… sorry. I think i could probably pull off this on an arduino, the issue is the RK libraries, OR, perhaps something else. I know that googling some of the errors i have gotten, those quys with the errors are told to upgrade their libraries. Currently the library for the RK is 1.0.8, the newer libraries that fixed their issues they reported, were 1.1.1 or later. I must admit, my issues are in part moving from arduino and the arduino ide to VScode. So I think i have library issues, pin issues, and lack knowledge of c++. Hence, i was hoping to see a working example on the argon with the featherwing tft/SD card… I have the graphics workiing on the TFT with argon… its the SD card that is kicking my …
I will mention, that example you sent, only has the HX8357 and SDFat libraries… I have those, and in lieu of the HX8357 i have the HX8357_RK plus the GFX_RK, ImageReader,Spiflash (which i don’t think i need), STMPE610, and a few others. My fail to compile displays a lot of errors from the ImageReader, and SPIFlash libraries.
It definitely compiles without error and I can read .bmp files from SD to the screen. My only observation is that the screen write speed is slow - certainly versus a Photon with a ILI9341 (320x240). It is most definitely a HX8357.
Includes were like this
And library versions
Hope that helps you - did you #include “Particle.h” ?
Thanks so much for the pointers… i have been all over the place with different libraries, but i am using the same ones you are now, except i do have the GFX_RK in addition. The particle library is not declared in the main ino, but it is in the HX8357.h file. I had a second look at what Scruff suggested and have tried using that code (it has gotten me the closest to getting this to work). I have gotten it to compile and flash, but for some reason, my initial program still displays (it draws lines and text on the screen instead of loading a BMP), it flashes for a second a white screen (the bmp is not white and my program is black with white text) but goes right back to the original program. I don’t even understand how that is possible. I even have reinstalled the toolchain a few times.
These are my defines… (cause this is about all i have changed to the code linked above - what was there didn’t work) #define SDcard D2 #define TouchScr D3 #define DisplayCS D4 #define DisplayDC D5 #define TFT_RST -1 #define SPIMasterIn MISO #define SPIMasterOut MOSI #define Clock SCK
And my Adafruit_HX8357 tft() class
Adafruit_HX8357 tft(DisplayCS, DisplayDC, TFT_RST);
I think the pins in the class above are messed up… i have tried so many different combinations.
Again, thanks for the library version info. Not knowing what is wrong i have been switching out libraries to make it work. even tried using the SD library and an old ImageReader library.
Yes, I have used the RK files. Exactly the same libraries as you, with the exception of those additional libraries i need, and you need (like the font) libraries which are different.
I did read something about the soldering and was a bit overwhelmed at the time… i may check into that some more. Maybe that is the issue. lol… maybe the code is perfect and it is a hardware issue. That would be a first for this project!
Well, as embarrassing as this is, I suppose it might help the next guy. Your code works, as well as a tweak of it as I have now. The issue was, I was not using a correct “24bit” graphic. Even though I thought I was. So, my advise if someone happens along this thread, and its not loading a bmp, be sure to do your testing on the images provided in the libraries. It would have saved me about 30 hours of manipulating the code.