Skip to content

Give the opportunity to set the polarity to 1 and not 0. #33

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 1 commit into from
Jan 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion adafruit_max31865.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class MAX31865:
:param int ref_resistor: Reference resistance. Defaults to :const:`430.0`
:param int wires: Number of wires. Defaults to :const:`2`
:param int filter_frequency: . Filter frequency. Default to :const:`60`
:param int polarity: set to 1 if controller clock idles high. Default 0.


**Quickstart: Importing and using the MAX31865**
Expand Down Expand Up @@ -120,6 +121,7 @@ def __init__(
spi,
cs,
*,
polarity=0,
rtd_nominal=100,
ref_resistor=430.0,
wires=2,
Expand All @@ -128,7 +130,7 @@ def __init__(
self.rtd_nominal = rtd_nominal
self.ref_resistor = ref_resistor
self._device = spi_device.SPIDevice(
spi, cs, baudrate=500000, polarity=0, phase=1
spi, cs, baudrate=500000, polarity=polarity, phase=1
)
# Set 50Hz or 60Hz filter.
if filter_frequency not in (50, 60):
Expand Down