What it is: The MAX6675 reads a K-type thermocouple, letting you measure from 0 to 1024 °C — far hotter than any silicon sensor. Perfect for kilns, reflow ovens, soldering, and engines.
How it works: It's a read-only SPI device that does the thermocouple cold-junction compensation and outputs a 12-bit temperature. This sketch uses a bit-banged SPI on three ordinary GPIOs, so it doesn't clash with the OLED's I2C pins.
Wiring:
MAX6675 SO (data out) -> GPIO10
MAX6675 SCK (clock) -> GPIO6
MAX6675 CS (select) -> GPIO7
MAX6675 VCC -> 3V3
MAX6675 GND -> GND
Thermocouple: + and - screw terminals on the module (yellow = +, red = -).
OLED VCC=3V3, GND=GND, SDA=GPIO4, SCL=GPIO5
Libraries: "MAX6675 library" by Adafruit, plus "Adafruit SSD1306" and "Adafruit GFX Library".
On screen / Serial: temperature in °C. Touch the thermocouple tip to something warm to see it climb.
Gotchas: The MAX6675 needs at least ~250 ms between reads — don't poll faster. A reading that's stuck near 0 or wildly high usually means a reversed or open thermocouple. Keep the thermocouple wire away from mains for safety.