Skip to content

Instantly share code, notes, and snippets.

@gkhays
Last active July 19, 2026 16:30
Show Gist options
  • Select an option

  • Save gkhays/0b4ede4866fb037810b1cee9e8b4a261 to your computer and use it in GitHub Desktop.

Select an option

Save gkhays/0b4ede4866fb037810b1cee9e8b4a261 to your computer and use it in GitHub Desktop.
Beyond the Blue Horizon art project assistance

Beyond the Blue Horizon

New Art Project Cronjob - run every 20 minutes

*/20 * * * *
* * * * * myjob.sh >> /var/log/myjob.log 2>&1
from gpiozero import LED
from time import sleep

# Replace 17 with the GPIO pin number connected to the relay
relay = LED(17)

# Turn the engine on
relay.on()
print("Engine is ON")
sleep(5)  # Keeps the engine on for 5 seconds

# Turn the engine off
relay.off()
print("Engine is OFF")
image

SRD-12VDC-SL-C
https://a.co/d/0gLZXBqK

image image image image

References

GPIO

5v Power

image image image

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment