In my project, I have two input pins 6 & 7 ( physical ) defined as interupts. And two pins 8 & 9 defined as outputs. The latter two have alias RLA01 & RLA02 which I wish to use to drive two relays. Pins are defined in code as below
The interupts are working, I know this for sure.
Later in my script I have the following routine:
I've no doubt I've made an error, but can anyone else see what it is ?
In the definition of RLA01 I've put an internal pull_up on the pin. Should there be an actual resistor pulling the pin to 3v on my own circuit board too?
Code:
GPIO9 = Pin(6,Pin.IN,Pin.PULL_DOWN)GPIO10 = Pin(7,Pin.IN,Pin.PULL_DOWN)RLA01 = Pin(8,Pin.OUT,Pin.PULL_UP)RLA02 = Pin(9,Pin.OUT,Pin.PULL_UP)
Later in my script I have the following routine:
Code:
elif (Condition): print("This statement is printed - so I definately get here in the code, but I see no indication of the pin 8 being raised or lowered.") RLA01.value(1) time.sleep(2) RLA01.value(0)
In the definition of RLA01 I've put an internal pull_up on the pin. Should there be an actual resistor pulling the pin to 3v on my own circuit board too?
Statistics: Posted by APL2 — Wed Aug 21, 2024 3:44 pm