microPython on esp32 C3 mate error InvalidPin when use GP19 for relay.
Sebastien Jourdan last edited by
With microPython on esp32 C3 mate, I would like to use a 3A Relay unit, for that I use GP19 which are also dedicate for USA D+, with the following code:
relay = machine.Pin("GP19", machine.Pin.OUT)
if temp > 42:
elif temp < 40:
But I have this error:
Traceback (most recent call last):
File "main.py", line 7, in <module>
ValueError: invalid pin
Do you know why?
Is it possible to use GP19 for a relay even if this Pin is dedicate to USA D+?
stjofr last edited by
Why don't you use the 1st argument (pin number) in integer format ?
ajb2k3 last edited by
the GP is not required, only numbers are required.