Traduit de English par IA ·
Presque, mais c’est dans l’autre sens, et ça piège tout le monde. Les noms sont vus du point de vue du Pi : MOSI, c’est le Pi qui envoie au composant, MISO, c’est le composant qui envoie au Pi. DO sur ton breakout signifie « données sorties du MAX31855 », donc DO va sur MISO, GPIO 9, broche 21.Le MAX31855 ne reçoit jamais rien : tu mets simplement CS à l’état bas et tu cadences 32 bits en sortie, il n’a donc aucune broche d’entrée. Laisse MOSI (broche 19) non connectée. Câblage :
VIN -> 3.3 V (broche 1)
GND -> GND (broche 6)
DO -> GPIO 9 MISO (broche 21)
CLK -> GPIO 11 SCLK (broche 23)
CS -> GPIO 8 CE0 (broche 24)
Active SPI dans raspi-config, puis lis 4 octets avec spidev à 1 MHz ou moins. Les bits 31..18 représentent la température du thermocouple par pas de 0,25 C, le bit 16 est le drapeau de défaut. Vérifie ce drapeau avant d’envoyer quoi que ce soit, sinon un thermocouple ouvert apparaît comme un nombre étrange sur ton graphique.
Close, but it’s the other way round, and it trips everyone. The names are from the Pi’s point of view: MOSI is the Pi sending to the chip, MISO is the chip sending to the Pi. DO on your breakout means « data out of the MAX31855 », so DO goes to MISO, GPIO 9, pin 21.
The MAX31855 never receives anything, you just pull CS low and clock out 32 bits, so it has no input pin at all. Leave MOSI (pin 19) unconnected. Wiring:
VIN -> 3.3 V (pin 1)
GND -> GND (pin 6)
DO -> GPIO 9 MISO (pin 21)
CLK -> GPIO 11 SCLK (pin 23)
CS -> GPIO 8 CE0 (pin 24)
Enable SPI in raspi-config, then read 4 bytes with spidev at 1 MHz or below. Bits 31..18 are the thermocouple temperature in 0.25 C steps, bit 16 is the fault flag. Check that flag before you send anything, an open thermocouple otherwise shows up as a strange number on your chart.

