food feeder

Need more details? Like Apex programming? Which feeder are you using?
 
15 12,16 * * * ./feed_tank.py

#!/usr/bin/python3
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
MOTOR_PIN = 18
GPIO.setup(MOTOR_PIN, GPIO.OUT)
try:
# Turn the motor on
print("Feeding Fish!")
GPIO.output(MOTOR_PIN, GPIO.HIGH)

# Wait for 15 seconds
time.sleep(15)

# Turn the motor off
print("Feeding Complete")
GPIO.output(MOTOR_PIN, GPIO.LOW)
finally:
# Clean up GPIO settings
GPIO.cleanup()
print("Sleeping...")
 
OSC 000:00/000:30/000:30 Then ON
If Time 00:00 to 15:00 Then OFF
If Time 15:02 to 00:00 Then OFF
If FeedA 000 Then ON

is this prorgam ok for feeder
 

TOP 10 Trending Threads

ARE YOU READY TO CONFESS TO CRAZIEST, DUMBEST, FUNNIEST THING YOU’VE EVER DONE IN REEFING?

  • Yeah, I'll confess! (Share your story in the comments!)

    Votes: 24 63.2%
  • Nah, I'll keep mine a secret...(Don't be like that, share with the class!)

    Votes: 14 36.8%
Back
Top
Home
Post thread…
Market
What's new