Skip to content

error in the code #1

Description

@Hussam991

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

Activity

  1. mokrunka commented on Sep 5, 2020

    @mokrunka

    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)

  2. Hussam991 commented on Sep 7, 2020

    @Hussam991
    Author

    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 ?

  3. mokrunka commented on Sep 7, 2020

    @mokrunka

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

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

  4. Hussam991 commented on Sep 7, 2020

    @Hussam991
    Author

    RPi
    yes i tried the example but it not work

  5. cwaldod commented on Sep 17, 2021

    @cwaldod

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions