Multiple thermocouples on raspberry pi

别等时光非礼了梦想. 提交于 2019-12-03 15:04:34

You can share the MISO and SCLK lines among the devices, and then each device will need its own CS. Something like:

In this case Master is the Pi, and Slaves are the MAX31855's. SS (Slave Select) is the same as CS (Chip Select).

from max31855 import MAX31855, MAX31855Error

cs_pin_1=24
clock_pin=23
data_pin=22
cs_pin_2=21
cs_pin_3=20
units = "f"

thermocouple1=MAX31855(cs_pin_1, clock_pin, data_pin, units)
thermocouple2=MAX31855(cs_pin_2, clock_pin, data_pin, units)
thermocouple3=MAX31855(cs_pin_3, clock_pin, data_pin, units)

You could use a TH7 pi hat which allows up to seven thermocouple inputs. This PCB uses the standard python SPI interface. Python Code plus documentation below. https://github.com/robin48gx/TH7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!