Quantcast
Viewing all articles
Browse latest Browse all 1259

Python • Re: Reset gpio output when test is finished

I use a function to clean out things.

Code:

def My_Exit():    Pin(27, mode=Pin.OUT, value=0)#     Pin(15, Pin.IN, value=0)#    print("Stopping LED")    Pin(27, 0)#     print("Stopping LCD")#     lcd.clear()#     print("Stopping PWM")#     pwm.deinit()    print("")    print(" MY-EXIT-1 - RUNNING My_Exit")    print(" MY-EXIT-2 - CALLING sys.exit()")    print("")    sys.exit()
Thank you to everybody

Statistics: Posted by jcd95 — Thu Apr 10, 2025 3:40 pm



Viewing all articles
Browse latest Browse all 1259

Trending Articles