This library provides an interface to interact with the MAX31855 thermocouple-to-digital converter using MicroPython. It allows for easy integration of temperature measurements into your MicroPython-based projects.
- Simple and intuitive API for temperature reading
- Support for both hardware and software SPI interfaces
- Error detection and reporting for common thermocouple faults
Before using this library, ensure that your hardware is compatible with MicroPython and that the firmware is properly flashed on your device.
To install the MAX31855 MicroPython library, copy the library file to your MicroPython board's filesystem. This can typically be done using a file transfer tool appropriate for your board.
After installation, import the library and initialize the MAX31855 object with the appropriate SPI and CS (chip select) pins:
from max31855 import MAX31855
from machine import SPI, Pin
spi = SPI(1)
cs = Pin('X5', Pin.OUT)
max31855 = MAX31855(spi, cs)
temperature = max31855.read_temperature()
print("Temperature:", temperature, "°C")
Replace 'X5'
with the pin used for chip select on your board.
For more detailed information about the MAX31855, consult the data sheet.
If you encounter issues while using this library, double-check your wiring and ensure that your SPI settings (such as the clock speed and polarity) are correct for the MAX31855.
Contributions to this library are welcome. Please submit pull requests on GitHub or report any issues you encounter.
This project is licensed under the MIT License - see the LICENSE file for details.
For additional support, consider consulting the MicroPython forums or the repository's issue tracker.