You can usually add 2 resistors to the LM339 (one between the DAC and it, and one from its output back to the pin the resistor from the DAC was connected to), and that'll give it some hysteresis and make it less likely to turn on and off.
Hmm... if only there was a markdown for circuits :(
@mattbrailsford If you do what I suggest with the fully unrolled loop (and call it maybe every 10ms) then it'll make the display a lot less glitchy (although a bit more dim).
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You can usually add 2 resistors to the LM339 (one between the DAC and it, and one from its output back to the pin the resistor from the DAC was connected to), and that'll give it some hysteresis and make it less likely to turn on and off.
Hmm... if only there was a markdown for circuits :(
@mattbrailsford If you do what I suggest with the fully unrolled loop (and call it maybe every 10ms) then it'll make the display a lot less glitchy (although a bit more dim).