|
27 | 27 |
|
28 | 28 | **Software and Dependencies:**
|
29 | 29 |
|
30 |
| -* Adafruit CircuitPython firmware for the ESP8622 and M0-based boards: |
31 |
| - https://github.com/adafruit/circuitpython/releases |
| 30 | +* Adafruit CircuitPython firmware for the supported boards: |
| 31 | + https://circuitpython.org/downloads |
| 32 | +
|
32 | 33 | * Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
|
33 | 34 | """
|
34 | 35 | import math
|
|
70 | 71 |
|
71 | 72 |
|
72 | 73 | class MAX31865:
|
73 |
| - """Driver for the MAX31865 thermocouple amplifier.""" |
| 74 | + """Driver for the MAX31865 thermocouple amplifier. |
| 75 | +
|
| 76 | + :param ~busio.SPI spi: SPI device |
| 77 | + :param ~digitalio.DigitalInOut cs: Chip Select |
| 78 | + :param int rtd_nominal: RTD nominal value. Defaults to :const:`100` |
| 79 | + :param int ref_resistor: Reference resistance. Defaults to :const:`430.0` |
| 80 | + :param int wires: Number of wires. Defaults to :const:`2` |
| 81 | + :param int filter_frequency: . Filter frequency. Default to :const:`60` |
| 82 | +
|
| 83 | +
|
| 84 | + **Quickstart: Importing and using the MAX31865** |
| 85 | +
|
| 86 | + Here is an example of using the :class:`MAX31865` class. |
| 87 | + First you will need to import the libraries to use the sensor |
| 88 | +
|
| 89 | + .. code-block:: python |
| 90 | +
|
| 91 | + import board |
| 92 | + from digitalio import DigitalInOut, Direction |
| 93 | + import adafruit_max31865 |
| 94 | +
|
| 95 | + Once this is done you can define your `board.SPI` object and define your sensor object |
| 96 | +
|
| 97 | + .. code-block:: python |
| 98 | +
|
| 99 | + spi = board.SPI() |
| 100 | + cs = digitalio.DigitalInOut(board.D5) # Chip select of the MAX31865 board. |
| 101 | + sensor = adafruit_max31865.MAX31865(spi, cs) |
| 102 | +
|
| 103 | +
|
| 104 | + Now you have access to the :attr:`temperature` attribute |
| 105 | +
|
| 106 | + .. code-block:: python |
| 107 | +
|
| 108 | + temperature = sensor.temperature |
| 109 | +
|
| 110 | +
|
| 111 | + """ |
74 | 112 |
|
75 | 113 | # Class-level buffer for reading and writing data with the sensor.
|
76 | 114 | # This reduces memory allocations but means the code is not re-entrant or
|
@@ -172,7 +210,7 @@ def auto_convert(self, val):
|
172 | 210 |
|
173 | 211 | @property
|
174 | 212 | def fault(self):
|
175 |
| - """The fault state of the sensor. Use ``clear_faults()`` to clear the |
| 213 | + """The fault state of the sensor. Use :meth:`clear_faults` to clear the |
176 | 214 | fault state. Returns a 6-tuple of boolean values which indicate if any
|
177 | 215 | faults are present:
|
178 | 216 |
|
|
0 commit comments