Using Rotary Dip Switch and HEF4051, I want to get values from it when Switch's value changes. according to HEF4051 datasheet, Rotary Dip Switch's data goes to Out pin, and it's connected to Pin#28 at my device. so I wanna get specific value of pin,used and it returns: "inspecting bound method is not supported with micropython" and '1' how can i get pin's value?
from machine import Pin
rid = []
CID = Pin(28,Pin.IN) # pin 28 is connected with HEF4051's OUT pin
CID.value() #it returns 1 coz CID's pin mode is IN.
CID.value #"inspecting bound method is not supported with micropython"
def ID_check():
rid.append(CID.value()>>8) #there's two dip switches connected so i tried to make upper and lower byte
rid.append(CID.value()%256)