Compile / library problem

Hi I am trying to run the serial thermocouple code on my IDUINO MEGA and I get this error:

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

Perhaps I have not installed the library - I don’t know if I have done it properly or how to do it??

Here is the screen shot attached!

// this example is public domain. enjoy!

#include "max6675.h"

int thermoDO = 4;
int thermoCS = 5;
int thermoCLK = 6;

MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
int vccPin = 3;
int gndPin = 2;
void setup() {
  // use Arduino pins 
  pinMode(vccPin, OUTPUT); digitalWrite(vccPin, HIGH);
  pinMode(gndPin, OUTPUT); digitalWrite(gndPin, LOW);
  Serial.println("MAX6675 test");
  // wait for MAX chip to stabilize

void loop() {
  // basic readout test, just print the current temp
   Serial.print("C = "); 
   Serial.print("F = ");

Hi Clem,

Could you please copy/paste the error messages that you get when the upload fails?

When you add a library in the latest IDE, you must go into Sketch, Include Library, and then select Manage Libraries and install the library that you need from that menu.

error message is 2nd and third line of the post and also at the bottom of the image


Ok, now I understand how to load a library in this IDE system - and it now works - thank you.

1 Like