So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By WJ4IoT
#72678 For my problem you do not even need to have the MAX6675, only the Arduino IDE (1.8.5) and the official MAX6675 library is sufficient. So what is my problem, i am just a bit confused:
* If I verify the example with board Arduino UNO selected it verifies ok
* if I verify the example with a generic ESP8266 board or Wemos D1 R2 it will not find two libraries:
* The first library <avr/pgmspace.h> can be tackled (correctly?) by changing to <pgmspace.h>
* This is also covered in a MAX6675 version found on: MAX6675_Module_and_K_Type_Thermocouple and if I try to understand the coding correctly this handdled in the indef:

Code: Select all#ifdef __AVR
  #include <avr/pgmspace.h>
#elif defined(ESP8266)
  #include <pgmspace.h>
#endif
#include <util/delay.h>
#include <stdlib.h>
#include "max6675.h"

However <util/delay.h> is giving the next problem problem. Removing the prefix in this case will not give the same solution. Also <delay.h> can be found on multiple places in the Arduino IDE:
* C:\arduino\hardware\tools\avr\avr\include\util (best guess to use?)
* C:\arduino\hardware\tools\avr\avr\include\avr (looks like a "redirect")
* C:\arduino\hardware\arduino\avr\firmwares\wifishield\wifiHD\src\SOFTWARE_FRAMEWORK\SERVICES\DELAY
* C:\arduino\libraries\WiFi\extras\wifiHD\src\SOFTWARE_FRAMEWORK\SERVICES\DELAY
So cluless which one to select and what the correct prefix is.
The NOOB question can also be "Why is the standard delay function not used?"

Can anyone give me some inside, thanks in advance.

BTW realising that in the next step i need to address the pins with a "D" as prefix (perhaps I should also avoid certain pins depending on the device but that will search the forum for that one)