-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add setDisplayState() to turn display on and off #78
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, blinkRate()
is documented to do this already, with the appropriate arguments, and uses the same HT16K33 commands. From the .h file:
/*!
@brief Set display blink rate.
@param b One of:
HT16K33_BLINK_DISPLAYON = steady on
HT16K33_BLINK_OFF = steady off
HT16K33_BLINK_2HZ = 2 Hz blink
HT16K33_BLINK_1HZ = 1 Hz blink
HT16K33_BLINK_HALFHZ = 0.5 Hz blink
*/
void blinkRate(uint8_t b);
OK, looking at the |
Except the code does not actually do that, it makes sure it is on by hardcoding the ON value in the payload.
Also - an on/off command does not really fit in a method named I changed the comment to reflect what values you can actually use. |
I was looking at this at midnight previously, sorry. My only comment then is that I haven't found a really good name, but |
Agreed. setDisplayState() sounds good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good name, and I had no idea the brightness did not go to zero.
I am working on finalizing this - https://github.com/jonnybergdahl/Arduino_JBWopr_Library |
Thank you for creating a pull request to contribute to Adafruit's GitHub code!
Before you open the request please review the following guidelines and tips to
help it be more easily integrated:
of the code were modified. This will help us understand any risks of integrating
the code.
I added a setState(bool state) call that you can use to turn the display on or off.
doesn't apply to a supported platform of the library please mention it.
The change exposes an existing command in the HT16K33 chip.
strive to not break users of the code and running tests/examples helps with this
process.
This does not affect existing code.