Add auto reset of stm on start

This commit is contained in:
Konstantin Lampalzer 2021-09-04 15:35:38 +02:00
parent 4f564ca759
commit 91884bd433
2 changed files with 18 additions and 0 deletions

16
compLib/Reset.py Normal file
View file

@ -0,0 +1,16 @@
import RPi.GPIO as GPIO
import time
RESET_PIN = 23
class Reset:
@staticmethod
def reset_bot():
GPIO.setmode(GPIO.BCM)
GPIO.setup(RESET_PIN, GPIO.OUT)
GPIO.output(RESET_PIN, GPIO.LOW)
time.sleep(0.1)
GPIO.output(RESET_PIN, GPIO.HIGH)
time.sleep(0.5)