As simple as it gets - but does a gremlin lurk?

I’ve wired up a simple red LED to be on when the blade is off, and blink when the blade is on. But weirdly, after about 40 seconds of inactivity it starts pulsing. (See video).

The line controlling it is as simple as it gets:


And it’s wired to 3.3 volt pad, LED Power Pad 5, with 100 ohm resistor.

It only did it under battery power, not under USB power.

So I started peeling stuff out of the config, and when I removed the following OLED defines, the problem went away:

#define ENABLE_SSD1306
#define OLED_FLIP_180
#define PLI_OFF_TIME 60 * 1000

So it looks like something in the OLED setup is upsetting it.

I should say the OLED itself isn’t connected (I’m actually building a test setup) but should that make a difference to an unrelated LED? Or am I being true to form and have stumbled upon another minor gremlin?

Thoughts welcome, with thanks as always.


Out of curiosity, what do you have ProffieOSFontImageDuration set to in config.ini for the font (if at all), and what happens if you change that or the 3500 in this line?

I don’t have any font image duration in the config.ini (see below) and the ssd1306 file and the hybrid_font files are both completely standard with no changes.

I’m just off out, but I’ll experiment with changing the line you mentioned when I get back home later on. If it’s somehow converting 3500 to 35 seconds instead of 3.5 seconds, that would be pretty close to matching when the anomoly comes about.


# These settings are required (not optional) for correct OLED
# function with Sabersense SD card contents.
# Always include this config.ini file
# in the oled folder that contains your bitmaps.
# All animations have been optimised for 25 frames per second.
# Default is zero which equals 24 frames per second.

# Boot animations have been optimised to run for 7 seconds
# at 25 frames per second.
# Default is 4000 milliseconds (four seconds).

# Specifies length of Blaster Block breakup animations.
# Default is 1000 milliseconds (one second).
# Setting to zero means animation will follow wav file length.

# Specifies length of Clash breakup animations.
# Default is 500 milliseconds (half a second).
# Setting to zero means animation will follow wav file length.

So I’m seeing some weirdness here, but it doesn’t seem related to OLED at all to me, so I want to confirm that we’re seeing the same thing… Can you post your entire config file? Also, what version of ProffieOS are you using?

Oh and is it a V2 or V3 board?

Proffieboard is a V2 (not from KR, but has the ZZ logo on it).
OS is 7.8.

I agree, the pulsing LED problem isn’t OLED related as such - but removing the OLED defines from the config is what fixes it.

Complete config is here:

Just tried changing this number to 400 but it made no difference - pusling starts after about 38 seconds. I also hooked up an OLED tonight, and the pulsing starts before the battery display shuts off. So on the face of it, the two aren’t linked - but removing the oled defines from the config fixes it.

So I tried your config file, but I don’t see the same effect.
Are you sure you’re using 7.8? (And not the bad 7.9 release?)

All I see is that the LED starts to flicker (rapidly) after ~20 seconds or so.
Then it stops again after a little bit.

I’m not sure what’s causing the flickering yet though.
Could be related I suppose.

Interesting. So it sounds like you’re seeing what must surely be the same problem, it just looks a little different on your setup. Compared to yours, my flicker is more a slow pulse, perhaps 1.5 hertz, and it doesn’t stop no matter how long I leave it.

I just re-downloaded 7.8 to make doubly sure it was the correct OS, though I’m pretty sure it was. Battery is brand new and fully charged too.

No difference.

I also put a stopwatch on it to time exactly how long before the pulsing starts. It took 32 seconds from boot to pulse.

Once it was pulsing with the battery power on, I tried connecting the USB to my computer without powering down the battery, and the pulsing stopped immediately. I left it for a couple of minutes, then I unplugged the USB again, and after the same delay of 32 seconds the pulsing was back.

However there is one more interesting observation - selecting Serial or Serial + Mass Storage for upload has an effect. If I upload under Serial only, the pulsing is slightly faster than if I have Serial + Mass Storage selected. Comparison video below.

So I think I have a fix. (on github master)
Not sure if there is a better way to do it, but for now I just avoid messing with the system clock while PWM is in use.

1 Like

Thanks Prof.
That does indeed seem to have fixed it.
Am in your debt as always.