Skip to content

Latest commit

 

History

History
53 lines (46 loc) · 1.83 KB

README.md

File metadata and controls

53 lines (46 loc) · 1.83 KB


Logo

Temperature Reader

Raspberry Pi Pico MicroPython interface for the MAX31865 thermocouple amplifier

Getting Started

To get started with the MAX31865 driver on a MicroPython system, follow these simple steps.

Installation

  1. Download the max31865.py file from the repository.
  2. Copy the max31865.py file to your MicroPython device. You can use tools like ampy or a file transfer method suitable for your device.

Usage

  1. Connect the MAX31865 thermocouple amplifier to your Raspberry Pi Pico or any other MicroPython-supported board.
  2. Include the max31865.py module in your MicroPython script together with the machine module for configuring the SPI bus and chip select pin:
import machine
from max31865 import MAX31865
  1. Configure the SPI bus and chip select pin:
# Define SPI bus and chip select pin
spi = machine.SPI(0, baudrate=5000000, phase=1, sck=machine.Pin(2), mosi=machine.Pin(3), miso=machine.Pin(4))
cs = machine.Pin(machine.Pin.board.GP5)
  1. Create an instance of the MAX31865 class:
sensor = MAX31865(spi, cs)
  1. The current temperature can by retrieved by accessing the temperature attribute of the sensor instance:
temperature = sensor.temperature
print(f"Current Temperature: {temperature} °C")

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)