I’m going to be very embarrassed if I’ve missed something already documented about this, but here goes.
I have a modification of FeatureDemo that I started playing with to work my way towards what I actually need to do. I’m using a single 32x64 small panel for testing at the moment. My problem is the display blanks out at odd times. For a particular compile, the blanking seems to be consistent. The problem is, that the oddest things make the blinking stop!
BTW, another tidbit (clue?), when the loop runs with the blanking problem, it takes longer than when there is no blanking, presumably the amount of time the display is blanked.
I’ve attached just about the smallest version of this program that shows the problem, although I’ve seen it a couple of times as I’ve been learning to use these displays. As my attached source code is now, it has the blanking problem. Here is a partial list of the things that ‘fix’ the problem, although it is certainly not complete, for instance, having the Serial.println() somewhere else in loop() might also work, I didn’t test all possibilities.
Having a Serial.println(“.”) at the top of loop() (or any number of Serial.print() lines), but if it’s in setup() it does not work. It is now commented out.
I have reduced the segments down to three at line 135, the last one is my own:
#define DEMO_DRAW_CHARACTERS 1
#define DEMO_MONO_BITMAP 1
#define CC_BITMAP 1
If any one or two of these is not ‘1’, the blanking goes away.
If “USE_ADAFRUIT_GFX_LAYERS” is not defined, the blanking stops, but I need the GFX layers eventually.
On line 96, in my function drawFullScreenBitmap(), I have a superfluous line as the code stands now, which is the “backgroundLayer.fillScreen({ 0,0,0 }); (I was eventually going to add transparency), removing that line makes the blanking stop, but the blanking is happening both when this routine is called, and when it isn’t, so it does not make sense.
An added note: I noticed before that after a few hours of running the program continuously while blinking (seeing the problem) it started doing some odd things like only showing every other line and ‘shimmering’ (fast blinking, line by line?). But I didn’t put that in the first version of this post, since I wanted to make sure it didn’t happen in the working version. I ran it all night with printing the temperature, which made it stable (not blinking). It ran all night with no problems, and BTW, the temperature of the chip seems to be stable between 136 and 138 degrees F, (~58.9C). When I commented out the serial printing of the temperature (but left in initializing the temp routines) it came up within a few (20 or so, consistently) minutes ‘shimmering’ again, but not every other line blanked.
If anyone is interested, the only difference between what is in the Zip file linked below and the shimmery version is:
#include <InternalTemperature.h>
and in setup()
InternalTemperature.begin(TEMPERATURE_NO_ADC_SETTING_CHANGES);
This library is pointed to on the PJRC web page for the Teensy4.1 and can be found at:
InternalTemperature Library
I’ve also changed all the hardware (teensy4.1, SmartLED Shield, and another panel with the same 32x64 but different chipset) and no change the results.
I really do not like having such an unpredictable problem, any help would be appreciated.
It’s a little long to quote here, and I can’t upload a zip, so here is a link to the files:
FeatureDemoMod