Can't get Adafruit HX8357D screen to work

I have a project that was working fine with an ILI9341 screen, I decided to upgrade to more real estate and touch. I thought this would go fine, but all I have to show for it is a white screen.

I am using the particle ported Adafruit library for HX8357D. I am using the serial port to initiate and look at the printed feedback.
I am trying to run the graphicstest.ino and it gives me the following output.

    SPI Pins
    SS	:12
    SCK:13
    MOSI: 15
    MISO: 14

HX8357D Test!
Display Power Mode: 0xFF
MADCTL Mode: 0xFF
Pixel Format: 0xFF
Image Format: 0xFF
Self Diagnostic: 0xFF
Benchmark		            Time (microseconds)
Text			            1625126
Lines				    5491965
Rectangles (outline)	    506882
Circles	(outline)		    2360551
Triangles (outline)	   1534979
Triangles {filled}		    8219514
Rounded rects (outline)  747823
Rounded rects (filled) 	   20067215

Done!

What bothers me me is that the HEX values are all 0xFF

The Adafruit site says it should look like this:

Things look like they ā€œworKā€ I just have nothing but a blank white screen.

I am using the SPI pins A2-A5 Checked, checked and rechecked.

I did bridge the jumper to make the board use Hardware SPI.

Have you looked at any of these threads?
https://community.particle.io/search?q=hx8357

The first 6 or 8, yes, but I see I have many more to read than I thought. I canā€™t help but think Iā€™m doing something dumb.

Thanks

Itā€™s a while since I published this lib
https://build.particle.io/libs/Adafruit_HX8357/0.9.4

And I can recall some users having and solving the issue without any code change, but canā€™t remember what the root cause was, so Iā€™d have to go through these threads as well :wink:

I think you may be remembering people that didnā€™t hook up serial and the photon was waiting for them to press a key.
I may be having an issue with how libraries are structured now but it compiles and ā€œworksā€ so I wonderā€¦

Adafruit has made changes that apparently improve the speed for Arduino and also use the new GFX_library that supports (apparently) multiple fonts and proportional as well. Also adds support for ā€œbuttonsā€ with touch screen, but still I figured I must be able to work with this older version just to prove it all works. My existing code took great advantage of the mfGFX library so I wasnā€™t crazy about trying to port to the new one without hearing from others first.
Iā€™m just trying to prove it woks right now and donā€™t have my own code running except for a line that dims the backlight just to prove I an reaching it. Also the screen gives a barely perceptible flicker when I hit enter so again, something is going on. One of the threads mentioned something about a problem with needing to power cycle everything before it worked but I even tried that. No go.

@svartbjorn85, the new GFX library hasnā€™t been ported yet I believe.

What exact display are you using?
Mine has a pin that needs to be pulled controled in order to activate SPI mode.

Yeah, I doubt that s my problem here. Iā€™m going with the mfGFX lib. Iā€™m curious about the benefits the new lib would have but worried about resources it may take up. Right now if just be happy with circles and squaresā€¦

Itā€™s this one:
3.5" TFT 320x480 + Touchscreen Breakout Board w/MicroSD Socket - HXD8357D
PRODUCT ID: 2050

https://www.adafruit.com/products/2050

It does have a contact to bridge on the back of the board to force it to SPI. I did solder that connection.

I decided to try a different tack entirely and just insert the different library in my existing code (which was done before the library changes (2.0) I have a simple folder structure with Adafruit libs in one folder and the large SDFat lib in another. Theoretically it should compile and work, however I canā€™t compile because for some reason, it seems to think I have an Arduino.

Maybe this is some side effect of dropping a 2.0 lib in the old style.
This is neither here nor there since I just want to get this working with standard libs to see that it works and that i understand the new lib features. even though it compiles and runs,
Iā€™m going to go back and read the library documentation again to see if I got something wrong.

This is exactly the same board as mine - so I can dig it up and see whatā€™s up.

Can you try the samples provided with my lib?
I set up my display and it worked just as expected.
Whatā€™s your code and how exactly have got the display wired (all connections)?

That is basically what i have been trying to do . I feel like a Noob. I have been trying to get a successful comlipe but it always fails in the SdFat library. Saying that one file or another is not available. The last one was asking for a file that would only be wanted if it was for an Arduino. I am going to go through everything. I am wondering if something isnā€™t right with my setup. I did updates on everything so they are supposedly current.

@svartbjorn85, the Arduino issue is known with version 0.6.1. Try targeting either 0.6.0 or the new 0.6.2-rc.1 firmware versions to see if you have more success.

OK, but have you also tried the other samples - e.g. the BreakoutTouchPaint sample?
It's usually best to go step by step and not take the most complex sample to start with :wink:

How are you powering the display? From the photon or from the power supply directly? I had an issue with the white screen in the past because it was drawing too much power from the board.

OK, I have been doing my compiling with Particle Dev and CLI. I had a lot of changes to my previous project as far a libs go, and just abandoned the IDE once things were behaving.

Iā€™m just trying to do the example in the IDE and still it fails to compile now. I did finally get a big fat clue though. The followiung is the RAW message from the IDE:
Processing /workspace/spitftbitmap.ino
Skipping .ino file
particle-cli v1.19.4

! A newer version (1.21.0) of particle-cli is available.
! Upgrade now by running: npm install -g particle-cli

Checking library Adafruit_HX8357ā€¦
Checking library SdFatā€¦
Installing library SdFat 0.0.7 to /workspace/lib/SdFat ā€¦
Installing library Adafruit_HX8357 0.9.4 to /workspace/lib/Adafruit_HX8357 ā€¦
Library Adafruit_HX8357 0.9.4 installed.
Checking library Adafruit_mfGFXā€¦
Checking library Touch_4Wireā€¦
Installing library Touch_4Wire 0.9.3 to /workspace/lib/Touch_4Wire ā€¦
Library SdFat 0.0.7 installed.
Library Touch_4Wire 0.9.3 installed.
Installing library Adafruit_mfGFX 1.0.2 to /workspace/lib/Adafruit_mfGFX ā€¦
Library Adafruit_mfGFX 1.0.2 installed.
make -C ā€¦/modules/photon/user-part all
make[1]: Entering directory '/firmware/modules/photon/user-partā€™
make -C ā€¦/ā€¦/ā€¦/user
make[2]: Entering directory '/firmware/userā€™
Building cpp file: /workspace//src/spitftbitmap.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ā€¦/build/target/user/platform-6-m/workspace/src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=6 -DPLATFORM_NAME=photon -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD006 -DUSBD_PID_CDC=0xC006 -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=6 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DPARTICLE_NO_ARDUINO_COMPATIBILITY=0 -DSYSTEM_VERSION_STRING=0.6.1 -DRELEASE_BUILD -I./inc -Iā€¦/wiring/inc -Iā€¦/system/inc -Iā€¦/services/inc -Iā€¦/communication/src -Iā€¦/hal/inc -Iā€¦/hal/shared -Iā€¦/hal/src/photon -Iā€¦/hal/src/stm32f2xx -Iā€¦/hal/src/stm32 -Iā€¦/hal/src/photon/api -Iā€¦/platform/shared/inc -Iā€¦/platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -Iā€¦/platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -Iā€¦/platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -Iā€¦/platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -Iā€¦/platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -Iā€¦/platform/MCU/shared/STM32/inc -Iā€¦/platform/MCU/STM32F2xx/CMSIS/Include -Iā€¦/platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -Iā€¦/dynalib/inc -I/workspace//src -I./libraries -I/workspace//src -I/workspace//src -I/workspace//src -I/workspace//src -I/workspace/lib/Adafruit_mfGFX/src -I/workspace/lib/Adafruit_HX8357/src -I/workspace/lib/Touch_4Wire/src -I/workspace/lib/SdFat/src -I. -MD -MP -MF ā€¦/build/target/user/platform-6-m/workspace/src/spitftbitmap.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=BCM9WCDUSI09 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSE_THREADING=0 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_THREADING=0 -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x80A0000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=4 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,105 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="ā€œappā€" -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ā€¦/build/target/user/platform-6-m/workspace/src/spitftbitmap.o /workspace//src/spitftbitmap.cpp
/workspace//src/spitftbitmap.cpp:31:19: fatal error: SDFat.h: No such file or directory
#include ā€œSDFat.hā€
^
compilation terminated.
ā€¦/build/module.mk:267: recipe for target ā€˜ā€¦/build/target/user/platform-6-m/workspace/src/spitftbitmap.oā€™ failed
make[2]: *** [ā€¦/build/target/user/platform-6-m/workspace/src/spitftbitmap.o] Error 1
make[2]: Leaving directory ā€˜/firmware/userā€™
ā€¦/ā€¦/ā€¦/build/recurse.mk:11: recipe for target ā€˜userā€™ failed
make[1]: Leaving directory ā€˜/firmware/modules/photon/user-partā€™
ā€¦/build/recurse.mk:11: recipe for target ā€˜modules/photon/user-partā€™ failed
make[1]: *** [user] Error 2
make: *** [modules/photon/user-part] Error 2HIDE RAW
Error: Could not compile. Please review your code. pirate_captain v0.6.1
It looks like the bug of running Arduino. I am targeting 0.61 .
But far more importantly I Am running The latest version of particle cli

Welcome to the Particle Command line utility!
Version 1.21.0


Any idea why the cli Web IDE uses is not the same?

Argh! I read your message to mean that I want 6.1. Noooo.

Thanks for the tip, I was running from 5V direct to the screen, but it turned out I got the screen to do something and it worked with 3.3v or 5v.

I went back to my original project and did the changes I needed to use the new display. Setting the target to 6.2rc1 did the trick for getting a proper compile. I am still unable to use the new library structure or even get a compile using Web IDE. The error that says I have an outdated CLI is baffling. I do want to move things to the proper form, but for right now I am happy. I think Particle Dev was failing to compile because I was using 6.1. So I was wrestling with a combination of fails depending on my environment.
For now Iā€™m going to move on with what I have but I need to figure out what is wrong with web ide.
The best part of banging your head against the wall is how good it feels when you stop.