Skip to content

Add brightness getter/setter. #17

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

Merged
merged 7 commits into from
Jun 24, 2022
Merged

Add brightness getter/setter. #17

merged 7 commits into from
Jun 24, 2022

Conversation

CedarGroveStudios
Copy link
Contributor

@CedarGroveStudios CedarGroveStudios commented Jun 5, 2022

Add a property to read and set NeoPixel array brightness levels for both the single NeoTrellis board driver neotrellis.py and the multiple-board driver multitrellis.py. Also updated the two examples to include use of the new property.

# Set the brightness value (0 to 1.0)
trellis.brightness = 0.5

The brightness property is passed to the underlying neopixel driver class where brightness values in the range of 0.0 to 1.0 are verified.

Tested on an 8x8 NeoTrellis device consisting of four 4x4 NeoTrellis boards and a Feather M4 Express running CircuitPython 7.3.0.

Adafruit CircuitPython 7.3.0 on 2022-05-23; Adafruit Feather M4 Express with samd51j19

Copy link
Member

@ladyada ladyada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didnt test with hardware however seems ok!
@jedgarpark may want to test this as well when back from vacation

@jedgarpark
Copy link

Nice, I was just doing multi-trellis stuff and can use this. I’ll test when I’m back next week.

@jedgarpark
Copy link

I just tested it on the NeoTrellis 8x8 and it works beautifully! Thanks, this makes it much easier to pick colors and deal with brightness separately.

@CedarGroveStudios
Copy link
Contributor Author

Thank you, John!

@CedarGroveStudios
Copy link
Contributor Author

@ladyada Please let me know if there's anything I can do to help move this forward towards the merge.

@jepler
Copy link
Contributor

jepler commented Jun 24, 2022

@CedarGroveStudios it looks like there's a file that needs a conflict resolved. Are you familiar with this process, or would you like a hand?

@CedarGroveStudios
Copy link
Contributor Author

CedarGroveStudios commented Jun 24, 2022

@CedarGroveStudios it looks like there's a file that needs a conflict resolved. Are you familiar with this process, or would you like a hand?

@jepler Thanks for your offer to help. I’ll see if I can fix it myself. I only submit a couple of PRs in a year, so it takes me a while to relearn and discover all the new environment changes.

@CedarGroveStudios
Copy link
Contributor Author

Resolved, retested on the 8x8 NeoTrellis, and resubmitted. Should be good to go.

@jepler jepler merged commit 04f8140 into adafruit:main Jun 24, 2022
@jepler
Copy link
Contributor

jepler commented Jun 24, 2022

Thank you! Merging based on JP's earlier review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants