Skip to content

Fix UV index #10

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 2 commits into from
Aug 11, 2022
Merged

Fix UV index #10

merged 2 commits into from
Aug 11, 2022

Conversation

caternuson
Copy link
Collaborator

For #9. Should hopefully get UV index reading working.

Main things done:

  • Incorrect bit being set in CHLIST for enabling UV index (off by one)
  • The ucoeff values were set in wrong order (datasheet is confusing on this, order determined by trial and error)
    • Values also needed to be tuples instead of ints
  • Needed to force an ALS reading to update UV index value

Tested:

Adafruit CircuitPython 7.3.2 on 2022-07-20; Adafruit QT Py M0 with samd21e18
>>> import board
>>> import adafruit_si1145
>>> si = adafruit_si1145.SI1145(board.I2C())
>>> si.uv_index
0.08
>>> si.uv_index
0.78
>>> si.uv_index
5.09
>>> 

@caternuson caternuson requested a review from a team August 10, 2022 20:27
Copy link
Member

@tekktrik tekktrik left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix; my bad for the earlier hasty merge!

@tekktrik tekktrik merged commit 744e61a into adafruit:main Aug 11, 2022
@caternuson caternuson mentioned this pull request Aug 11, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Aug 12, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX1704x to 1.0.1 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX1704x#5 from sokratisvas/add-type-annotations

Updating https://github.com/adafruit/Adafruit_CircuitPython_SI1145 to 1.1.1 from 1.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_SI1145#10 from caternuson/iss9

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_MAX1704x
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.

2 participants