tdack / MAX6675

Python class to represent a MAX6675 thermocouple temperature measurement board
14 stars 13 forks source link

error in the code #1

Open Hussam991 opened 4 years ago

Hussam991 commented 4 years ago

i did it but now i have other problem the library that i use : https://github.com/tdack/MAX6675 the code that i use : `` import MAX6675.MAX6675 as MAX6675

CSK = 25
CS = 24
DO = 18

sensor = MAX6675.MAX6675 (CSK,CS,DO)

try:
        while True:
                Temp = sensor.readTempC()
                print ("temp ==> {0:0.2F}".format(Temp))
except KeyboardInterrupt:
        print ("error")

`` i have an error in this line sensor = MAX6675.MAX6675 (CSK,CS,DO) "argument 1 must be str, not int" can you help me

mokrunka commented 4 years ago

It would appear you have a typo in your sensor variable declaration. Try:

sensor = MAX6675.MAX6675(CSK,CS,DO)

instead of:

sensor = MAX6675.MAX6675 (CSK,CS,DO)

Hussam991 commented 4 years ago

i tried it "sensor = MAX6675.MAX6675(CSK,CS,DO)" but its the same problem TypeError: argument 1 must be string, not int what can i do ?

mokrunka commented 4 years ago

What device are you using? RPi? Beagle one Black?

Have you looked at the example folder for your specific hardware setup?

Hussam991 commented 4 years ago

RPi yes i tried the example but it not work

cwaldod commented 3 years ago

I am having the same issue I am using an Max6675 with RPi and getting same error