Extend 'set_blink_rate()' to turn off display with value of '-1'#27
Extend 'set_blink_rate()' to turn off display with value of '-1'#27mungewell wants to merge 2 commits intosmittytone:mainfrom
Conversation
I have a project with multiple modules, when 'blink()' was enabled they blinked a slightly different rates... which looked funky. The register for blinking also includes a 'display_on' bit, so I access that with a vaule of '-1' to turn off the display(s). Set a normal blink rate to turn display(s) back on. Tested on the 'HT16K33Segment' from Adafruit.
|
I realized that it would be more useful if repeated writes of '-1' toggled the display off, on, off, on. That way the app wouldn't need to track the state. I'll revise the patch tonight... |
|
I'm going to hold off on this PR and look at other ways to implement this functionality. I don't think |
|
See the |
|
I adapted your test script for multiple displays: And added a blink check with PS. |
|
Aaargh! Rookie error! Updated now. Use |
I have a project with multiple modules, when 'blink()' was enabled they blinked a slightly different rates... which looked funky.
The register for blinking also includes a 'display_on' bit, so I access that with a vaule of '-1' to turn off the display(s). Set a normal blink rate to turn display(s) back on.
Tested on the 'HT16K33Segment' from Adafruit.