Tuckie / max31855

Raspberry Pi driver for MAX31855 Cold-Junction Compensated Thermocouple-to-Digital Converter
MIT License
53 stars 30 forks source link

Struggling with code implementation... #9

Closed valid8riam closed 7 years ago

valid8riam commented 7 years ago

I'm struggling with getting the test code to work. I'm just using the initial code which is as follows:

from max31855 import MAX31855, MAX31855Error

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

When I run this code on my RPi using Idle I get the following error:

NameError: name 'thermocouple' is not defined...

I looked in MAX31855.py for a function or class defined as 'thermocouple' and do not see one. Can anyone tell me what simple thing I am doing wrong here?

Thanks in advance.

valid8riam commented 7 years ago

I resolved this issue - stupid me typo...