-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
added enable_dim_neopixel(), disable_dim_neopixel(), set_dim_level() #246
Conversation
Looks like the test is failing because the code is too large for the Arduino Zero, Gemma M0 and Trinket M0. How about adding a single |
The 2.0.0-rc2 builds have only 56 bytes free on non-Express boards. You can get back some more space by lowering |
I'll check it out tonight. I think I'll go the |
I agree with @tannewt about the API, though with only 56 bytes left, you may still need to make room by fiddling with |
Oops. I'll fix this soon. Defined some variables in the wrong place relative to |
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.
Looks nearly there! Thanks!
One more change I'd like to see is that rgb_status_brightness be uint8_t. You'll need to check the value you get in samd_set_rgb_status_brightness to make sure its between 0 and 255 and throw a ValueError if its not.
…now throws ValueError if value is not between 0 and 255
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.
Looks good! Thank you!
This adds 3 functions to the samd module for the user to control the behavior of the neopixel:
enable_dim_neopixel and disable_dim_neopixel turn on and off dim neopixel mode. set_dim_level takes in an integer from 0-255 and sets the brightness level of dim neopixel mode. The default brightness level for dim neopixel mode is 40. set_dim_level(0) will turn off the neopixel.