Yes, that does it! The lights blinked on and off after the PWM.
Experimenting, trying to minimize, and fine-tuning:
-It had to go through (1) off and (1) on cycle in order to work; it would not work just going directly to "on".
-One cycle is needed, and there had to be a minimum pause (sleep) of 0.01 seconds after "off"; omitting any pause after "on" retained functionality.
Here is what I reduced it to:
Thanks, deanhystad!
It's interesting, now that I've got this under control, I can see how and why PWM does not always give smooth dimming effect at very low cycle duty - the "flicker" is so slow that it is somewhat discernable rocky blips (at least, a subliminal mess at startup). Additionally, there is occasional haphazard loop steps. Oh well, that's another issue for another time.
Experimenting, trying to minimize, and fine-tuning:
-It had to go through (1) off and (1) on cycle in order to work; it would not work just going directly to "on".
-One cycle is needed, and there had to be a minimum pause (sleep) of 0.01 seconds after "off"; omitting any pause after "on" retained functionality.
Here is what I reduced it to:
for _ in range(1): GPIO.output(11, GPIO.LOW) sleep(0.01) GPIO.output(11, GPIO.HIGH)I apologize for the inconsistencies in the comments; it makes for nonsense. They originally came from a tutorial, and the differences were from tweaking. I was pre-occupied with forum format and wondering why the straight forward logic of the code wasn't operating as intended.
Thanks, deanhystad!
It's interesting, now that I've got this under control, I can see how and why PWM does not always give smooth dimming effect at very low cycle duty - the "flicker" is so slow that it is somewhat discernable rocky blips (at least, a subliminal mess at startup). Additionally, there is occasional haphazard loop steps. Oh well, that's another issue for another time.