Skip to content

Commit

Permalink
Added a script to test the rocket signals
Browse files Browse the repository at this point in the history
  • Loading branch information
dyka3773 committed Dec 13, 2023
1 parent a27fa1b commit 0b0e0e1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Rocket/archive/test_rocket_signals.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import Jetson.GPIO as GPIO
import time

LO_pin = 11
SOE_pin = 13
SODS_pin = 15

GPIO.setmode(GPIO.BOARD)

GPIO.setup(LO_pin, GPIO.IN)
GPIO.setup(SOE_pin, GPIO.IN)
GPIO.setup(SODS_pin, GPIO.IN)


def get_status_of_signal(signal):
"""Gets the status of the given signal.
Args:
signal (PinsEnum): The signal to get the status of.
Returns:
bool: The status of the given signal.
"""
return GPIO.input(signal) == GPIO.HIGH


while True:
print(get_status_of_signal(11))
print(get_status_of_signal(13))
print(get_status_of_signal(15))
print()
time.sleep(1)

0 comments on commit 0b0e0e1

Please sign in to comment.