0

I bought some MAX31855 thermocouples for my raspberry pi project. I downloaded a library from github --> https://github.com/Tuckie/max31855.git

I run the file "test_max31855" and it says "Ran 2 tests in 0.023s OK" I then make a new file with the following code suggested on that github page.

from max31855 import MAX31855, MAX31855Error
import RPi.GPIO

cs_pin=24
clock_pin=23
data_pin=18
units="f"
thermocouple=MAX31855(cs_pin, clock_pin, data_pin, units)
print(thermocouple.get())
thermocouple.cleanup()

I save the file to my desktop folder and when I run this I get the error ImportError: cannot import name 'MAX31855'

I have no idea why it doesn't work or where to figure out how to fix it.

Thanks in advance CW

EDIT: If I open a file within the max31855 folder and run it everything works. If I do a ctl+N and bring up a new window of python and run it off of that same shell it doesn't give me an error all it does is read 32.0 (from my arduino experience this means something isn't connected.) But if I close the python shell and try to run it again I get the same error as above.

Craig Walker
  • 131
  • 2
  • 10

0 Answers0