Help

04 May 2011

I'm having an issue with MAX6675 Thermocouple code I am using the same code given in the cookbook with the max6675 library, but it's giving me 2 errors when I compile it...

" Undefined symbol max6675::read_temp() (referred from main.cpp.cpp.LPC1768.o). (EL6218E)" in file "/"

" Undefined symbol max6675::max6675(mbed::SPI&, PinName) (referred from main.cpp.cpp.LPC1768.o). (EL6218E)" in file "/"

here is the code from the cookbook:

http://mbed.org/cookbook/MAX6675-Thermocouple

Here is the max6675 library:

http://mbed.org/users/tecnosys/programs/max6675/5ztnc/docs/max6675_8h_source.html

What am I doing wrong?

05 May 2011

I just tried getting the code in the cookbook page that you referenced and it compiled for me with no errors.

These are the steps that I used:

  1. From the cookbook page, I went to this page for the the actual MAX6675 code. This page indicated that it was a library but it actually shows up as a program.
  2. I clicked on the link to import the MAX6675 code as a program. This brought a program called max6675 into my Program Workspace. It contained two files: max6675.h and max6675.cpp
  3. I right clicked on this newly imported project and added a new file called main.cpp
  4. I copy and pasted the example code from the cookbook page and pasted it into this blank main.cpp source file.
  5. I was then able to successfully compile the code

I don't quite understand why the MAX6675 code was a program and not a library but the steps above still got it to work

24 Nov 2015

Please can you upload the code from cookbook because the original page has been removed and i don't know what code i must copy in the new main.cpp to compile all. thanks a lot.

Adam Green wrote:

I just tried getting the code in the cookbook page that you referenced and it compiled for me with no errors.

These are the steps that I used:

  1. From the cookbook page, I went to this page for the the actual MAX6675 code. This page indicated that it was a library but it actually shows up as a program.
  2. I clicked on the link to import the MAX6675 code as a program. This brought a program called max6675 into my Program Workspace. It contained two files: max6675.h and max6675.cpp
  3. I right clicked on this newly imported project and added a new file called main.cpp
  4. I copy and pasted the example code from the cookbook page and pasted it into this blank main.cpp source file.
  5. I was then able to successfully compile the code

I don't quite understand why the MAX6675 code was a program and not a library but the steps above still got it to work