This repository has been archived on 2025-06-01. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
compLIB/client_s1/compLib/Reset.py
Konstantin Lampalzer 9b567b8c6c Protobuf prototype
2022-03-18 18:11:16 +01:00

24 lines
514 B
Python

import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False)
RESET_PIN = 23
BOOT_PIN = 17
class Reset:
"""Reset the co-processor
"""
@staticmethod
def reset_bot():
"""Reset the co-processor
"""
GPIO.setmode(GPIO.BCM)
GPIO.setup(RESET_PIN, GPIO.OUT)
GPIO.setup(BOOT_PIN, GPIO.OUT)
GPIO.output(RESET_PIN, GPIO.LOW)
GPIO.output(BOOT_PIN, GPIO.LOW)
time.sleep(0.1)
GPIO.output(RESET_PIN, GPIO.HIGH)
time.sleep(1.5)