Skip to content

adding methods to setup critical/upper and lower temperatures #29

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 13 commits into from
May 19, 2021
Merged

adding methods to setup critical/upper and lower temperatures #29

merged 13 commits into from
May 19, 2021

Conversation

jposada202020
Copy link
Contributor

@jposada202020 jposada202020 commented Apr 29, 2021

Solves #27.

Trying to implement different functions according to issue 27. If this is already included after the board revision please feel free to close this PR. I could implement the other functions, just want to verify first.

Tested in

Adafruit CircuitPython 6.2.0-beta.3-188-g05ed179e1 on 2021-03-15; Adafruit Feather RP2040 with rp2040

This could be tested using the following script

import time
import board
import adafruit_mcp9808

i2c = board.I2C()  # uses board.SCL and board.SDA
mcp = adafruit_mcp9808.MCP9808(i2c)

print("setting values, and reading temperature in between to clear the buffer")
mcp.upper_temperature = 89
print(mcp.temperature)
time.sleep(1)
mcp.lower_temperature = 55
print(mcp.temperature)
time.sleep(1)
mcp.critical_temperature = 100
print(mcp.temperature)
time.sleep(1)

print("checking that values are stored")
print("Lower Temperature Limit:", mcp.lower_temperature)
print("Upper Temperature Limit:", mcp.upper_temperature)
print("Critical Temperature Limit:", mcp.critical_temperature)

@jposada202020 jposada202020 requested a review from a team April 29, 2021 16:28
Copy link
Member

@tannewt tannewt 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 adding these! One suggestion about the comments.

@jposada202020
Copy link
Contributor Author

Will do, just wanted to know if still wanted, I need to correct all the docs, change the number type to const(0x03), defining those in Library_variable, approach a little more to the Library standars.
Thanks. will do those changes and add the two other methods.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Two more things. Thanks!

@jposada202020 jposada202020 linked an issue May 4, 2021 that may be closed by this pull request
@jposada202020
Copy link
Contributor Author

@tannewt before you take a long journey in the BLE stuff could you verify this... :) thanks

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

A couple more things. Thanks for improving this!

@jposada202020
Copy link
Contributor Author

@tannewt changes were done as suggested. Thanks

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

A couple more minor things. Thanks!

jposada202020 and others added 6 commits May 18, 2021 20:22
Co-authored-by: Scott Shawcroft <[email protected]>
Co-authored-by: Scott Shawcroft <[email protected]>
Co-authored-by: Scott Shawcroft <[email protected]>
Co-authored-by: Scott Shawcroft <[email protected]>
Co-authored-by: Scott Shawcroft <[email protected]>
Co-authored-by: Scott Shawcroft <[email protected]>
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thank you!

@tannewt tannewt merged commit 8bd776b into adafruit:master May 19, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 22, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_AMG88xx to 1.2.8 from 1.2.7:
  > Added help text and problem matcher
  > Linting
  > Added pull request template
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_BME280 to 2.6.4 from 2.6.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_BME280#51 from jposada202020/adding_example_pico_API
  > Added help text and problem matcher
  > Added pull request template

Updating https://github.com/adafruit/Adafruit_CircuitPython_DotStar to 2.0.4 from 2.0.3:
  > Added help text and problem matcher
  > Linted
  > Added pull request template

Updating https://github.com/adafruit/Adafruit_CircuitPython_IL0373 to 1.3.8 from 1.3.7:
  > Added help text and problem matcher
  > Linted
  > Added pull request template
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_IL0398 to 1.1.6 from 1.1.5:
  > Added help text and problem matcher
  > Making actions pass
  > Added pull request template
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_IL91874 to 1.1.5 from 1.1.4:
  > Added help text and problem matcher
  > Trying to make actions pass
  > Added pull request template
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx to 2.4.6 from 2.4.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP230xx#38 from flyte/feature/mcp23017-intcap
  > Added help text and problem matcher
  > Added pull request template
  > "Increase duplicate code check threshold "
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP230xx#40 from FoamyGuy/pylintrc

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP9808 to 3.3.7 from 3.3.6:
  > Added help text and problem matcher
  > Added pull request template
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP9808#29 from jposada202020/adding_functions

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1608 to 1.2.7 from 1.2.6:
  > Added help text and problem matcher
  > Linted
  > Added pull request template
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1675 to 1.1.6 from 1.1.5:
  > Added help text and problem matcher
  > Linted
  > Added pull request template
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1680 to 1.0.1 from 1.0.0:
  > Added help text and problem matcher
  > Linted
  > Added pull request template
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1681 to 1.0.3 from 1.0.2:
  > Added help text and problem matcher
  > Linted
  > Added pull request template
  > "Increase duplicate code check threshold "
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1681#4 from FoamyGuy/pylint_to_precommit

Updating https://github.com/adafruit/Adafruit_CircuitPython_TinyLoRa to 2.2.3 from 2.2.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_TinyLoRa#43 from jposada202020/correcting_readthedocs_API
  > Added help text and problem matcher
  > Added pull request template
  > "Increase duplicate code check threshold "
@jposada202020 jposada202020 deleted the adding_functions branch May 24, 2021 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for other features - resolution, alarm, etc.
2 participants