ESP8266 with MAX6675

So far, we have sensors like the one for convenient temperature measurement DHT22 or that DS18B20  used. Unfortunately, we can only measure low temperatures with it, we cannot use it to measure a barbecue or measure an exhaust gas temperature. That is why I would like our module today MAX6675  to measure temperatures up to 1024 ° C. Instructions for using the module with an Arduino can easily be found on the Internet, Adafruit provides a Libary for this. Unfortunately, this libary is not compatible with the NodeMCUs without modification. In my opinion, the NodeMCUs are more suitable than Arduinos, since they are boards like ours WIFI kit 8  there, which already has a power supply with Li-Po batteries as well OLED display  have on board. It is also possible to integrate them into your own WiFi and to have the information output on a website or via MQTT.

As an application example, we use our LoLin NodeMCU V3 today and wire it like this:

NodeMCU LoLin V3 MAX6675 module
3.3V VCC


The Adafruit library exists here. Alternatively, this can also be installed in the ArduinoIDE via the library manager. The directory of the MAX6675 is then located at your other Libarys under C: \ Users \ username \ Documents \ Arduino \ libraries

Open the max6675.cpp file with an editor such as Nodepad ++and change the code as in the screenshot of:


You can then compile the code without errors:


#include "max6675.h"

int thermoDO = 12;
int thermoCS = 13;
int thermoCLK = 14;

MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);    void set up() {   Serial.begin(115200);      Serial.println("MAX6675 test");   // wait for MAX chip!   delay(500);

void loop() {        Serial.print("C =");     Serial.println(thermocouple.readCelsius());    //Serial.print("F = ");    //Serial.println (thermocouple.readFahrenheit ());      delay(1000);


On this basis, you can set up well and easily integrate your display or into your SmartHome solution.

Esp-8266Projects for beginnersSensors




habe die Library über die ArduinoIDE installiert, danach hat es ohne weitere Anpassungen funktioniert, danke :-)



Bei mir gabs eine Fehlermeldung… Das Delay war nicht definiert…
Folgende Änderung hat funktioniert:

// this library is public domain. enjoy!

#define _delay_ms(ms) delayMicroseconds((ms) * 2000)
//#include <avr/pgmspace.h>
//#include <util/delay.h>
#include “max6675.h”

Leave a comment

All comments are moderated before being published

Recommended blog posts

  1. Install ESP32 now from the board manager
  2. Lüftersteuerung Raspberry Pi
  3. Arduino IDE - Programmieren für Einsteiger - Teil 1
  4. ESP32 - das Multitalent
  5. OTA - Over the Air - ESP programming via WLAN