RSI-PI/examples/example_10_shutdown_safe.py
2025-04-27 02:03:42 +01:00

15 lines
274 B
Python

from RSIPI import rsi_api
rsi = rsi_api.RSIAPI()
try:
rsi.start_rsi()
print("Press Ctrl+C to stop RSI safely.")
while True:
pass
except KeyboardInterrupt:
print("\nEmergency stop triggered.")
rsi.safety_stop()
rsi.stop_rsi()