Go Down

Topic: MAX6675 with Due (Read 1 time) previous topic - next topic

egymeda

Hello, I'm using Type K thermocouple and it was working with Uno, now I'm trying the same code with same library with Due and I get the following error:


Arduino: 1.6.8 (Windows 10), Board: "Arduino Due (Programming Port)"

C:\Program Files (x86)\Arduino\libraries\max6675\max6675.cpp:9:24: fatal error: util/delay.h: No such file or directory

 #include <util/delay.h>

                        ^

compilation terminated.

exit status 1
Error compiling for board Arduino Due (Programming Port).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.



Code: [Select]



#include "max6675.h"

int thermoDO = 5;   // SO
int thermoCS = 6;   // CS
int thermoCLK = 7;  // SCK

MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);

 
void setup() {
  Serial.begin(9600);

 
  Serial.println("MAX6675 test");
  // wait for MAX chip to stabilize
  delay(500);
}

void loop() {
  // basic readout test, just print the current temp
 
   Serial.print("C = ");
   Serial.println(thermocouple.readCelsius());
   
 
   delay(3000);
}



Attached is MAX6675-library-master that I'm using


Your help is appreciated :D


Albi142857

Hi,
I have the same problem. How did you solved it?
Thank you

ard_newbie

#2
May 25, 2019, 11:18 am Last Edit: May 25, 2019, 11:29 am by ard_newbie
Remove util/delay.h from the library, this is for an AVR but your board is an ARM.


https://forum.arduino.cc/index.php?topic=19963.0

Go Up