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 color property to the TCS34725 class (closes #8). #13

Merged
merged 2 commits into from Oct 4, 2018

Conversation

Projects
None yet
2 participants
@process1183
Contributor

process1183 commented Oct 4, 2018

I built the module and docs locally using the instructions in the README, as well as running pylint (10.00/10). I then tested my changes with an Adafruit Feather M0 Express and the Adafruit TCS34725 sensor board using a modified copy of the example tcs34725_simpletest.py. Sample output from this script:

Detected color: #19190C
sensor.color = 1644812 #19190C
Temperature: 4508.97K Lux: 721.692

Detected color: #440705
sensor.color = 4458245 #440705
Temperature: 2961.51K Lux: 1572.29

Detected color: #101010
sensor.color = 1052688 #101010
Temperature: 8890.37K Lux: 267.161

@caternuson caternuson requested a review from adafruit/circuitpythonlibrarians Oct 4, 2018

Show outdated Hide outdated adafruit_tcs34725.py Outdated
@caternuson

This comment has been minimized.

Show comment
Hide comment
@caternuson

caternuson Oct 4, 2018

Contributor

Thanks for doing this. Looks good. Just have the question above in the review.

Contributor

caternuson commented Oct 4, 2018

Thanks for doing this. Looks good. Just have the question above in the review.

Use bitwise 'or' to combine r, g, and b.
For consistency, switch from '+' to '|' since bitwise operations are already being used.
#13 (comment)

@caternuson caternuson merged commit f82f166 into adafruit:master Oct 4, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@process1183 process1183 deleted the process1183:colorproperty branch Oct 5, 2018

tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Oct 5, 2018

Automated update by Adabot (adafruit/adabot@44d3b57)
Updating https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15 to 0.5.2 from 0.5.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_ADS1x15#16 from iBug/patch-1
  > ignore the board module imports in .pylintrc
  > Merge pull request adafruit/Adafruit_CircuitPython_ADS1x15#14 from adafruit/pypi_readme

Updating https://github.com/adafruit/Adafruit_CircuitPython_TCS34725 to 3.1.1 from 3.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_TCS34725#13 from process1183/colorproperty
  > Merge pull request adafruit/Adafruit_CircuitPython_TCS34725#12 from VladMihai28/issue11
  > ignore the board module imports in .pylintrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment