Hello
is it possible to disable the autostart of a script in Waaave Pool.
Backround is, I want to use Waaave Pool without a keyboard. Instead of it, I want to use Buttons to stop and start the scripts.
Stopping a script works peretty fine if it was started manually. But or some reason, the Autostart script, cannot be stopped.
I am absolutly no python programmer, so the script is pretty nasty
Maybe someone has an idea how to extend the script in a way to abort the start-script (what is the name), or, even better, how o disable the auto start
,# -*- coding: utf-8 -*-
import RPi.GPIO as GPIO
import os
import time
# GPIO-Pin, an dem der Taster angeschlossen ist
BUTTON_PIN = 17
# GPIO-Modus auf BCM setzen
GPIO.setmode(GPIO.BCM)
# GPIO-Pin als Eingang festlegen und Pull-Up-Widerstand aktivieren
GPIO.setup(BUTTON_PIN, GPIO.IN, pull_up_down=GPIO.PUD_UP)
def button_callback(channel):
print("Button was pushed!")
# Führe den Befehl aus, um den Prozess zu beenden
os.system('pkill -f ARTIFICIAL_LIFE_4_5')
print("ARTIFICIAL_LIFE_4_5 process terminated")
os.system('pkill -f CHROMATIC_ABERRATION_4_5')
print("CHROMATIC_ABERRATION process terminated")
os.system('pkill -f CONVOLUTIONAL_CHAOS_0')
print("CONVOLUTIONAL_CHAOS_0 process terminated")
os.system('pkill -f GENERIC_GEOMETRY_UTILITY')
print("GENERIC_GEOMETRY_UTILITY process terminated")
os.system('pkill -f HELLO_WORD_0')
print("HELLO_WORD_0 process terminated")
os.system('pkill -f SPECTRAL_MESH_4_5')
print("SPECTRAL_MESH_4_5 process terminated")
os.system('pkill -f super_haeckel_adventures_64')
print("super_haeckel_adventures_64 process terminated")
os.system('pkill -f TEMPORAL_VORTEX_4_5')
print("TEMPORAL_VORTEX_4_5 process terminated")
os.system('pkill -f WAAAVE_POOL_4_5')
print("WAAAVE_POOL_4_5 process terminated")
# Event erkennen, wenn der Button gedrückt wird (fallende Flanke)
GPIO.add_event_detect(BUTTON_PIN, GPIO.FALLING, callback=button_callback, bouncetime=200)
try:
# Hauptschleife laufen lassen
while True:
time.sleep(0.1)
except KeyboardInterrupt:
print("Script beendet")
finally:
# GPIO-Einstellungen zurücksetzen
GPIO.cleanup()