cscool36
Full time elf
Hi all,
See script below
#!/bin/sh
###########################################################
# GPIO-On.sh - Turn on one of the Pi's GPIO Outputs #
###########################################################
# Set the GPIO number (NOT the pin number)
GPIO="21"
TIMER="200"
# Make sure the pin is setup for output.
/opt/fpp/src/fpp -G ${GPIO},Output
# Turn on the pin
/opt/fpp/src/fpp -g ${GPIO},Output,1
# Timer
/opt/fpp/src/fpp -s ${Timer},clock
/opt/fpp/src/fpp -s ${Timer},1
# Make sure the pin is setup for output.
/opt/fpp/src/fpp -G ${GPIO},Output
# Turn Off the pin
/opt/fpp/src/fpp -g ${GPIO},Output,0
When I run this script. This is what I get.
2,1,Configuring GPIO,21,Output,,,,,,,,,
2,1,Setting GPIO,21,Output,1,0,,,,,,,
2,0,75,No playlist scheduled.,
2,0,75,No playlist scheduled.,
2,1,Configuring GPIO,21,Output,,,,,,,,,
2,1,Setting GPIO,21,Output,0,0,,,,,,,
I need some help with setting the timer code in red. I would like to turn on a relay
GPIO 21 and 90 minutes later it will turn off. The on/off part of the script works well, just need timer info to get the script to work.
Thanks
Colin
See script below
#!/bin/sh
###########################################################
# GPIO-On.sh - Turn on one of the Pi's GPIO Outputs #
###########################################################
# Set the GPIO number (NOT the pin number)
GPIO="21"
TIMER="200"
# Make sure the pin is setup for output.
/opt/fpp/src/fpp -G ${GPIO},Output
# Turn on the pin
/opt/fpp/src/fpp -g ${GPIO},Output,1
# Timer
/opt/fpp/src/fpp -s ${Timer},clock
/opt/fpp/src/fpp -s ${Timer},1
# Make sure the pin is setup for output.
/opt/fpp/src/fpp -G ${GPIO},Output
# Turn Off the pin
/opt/fpp/src/fpp -g ${GPIO},Output,0
When I run this script. This is what I get.
2,1,Configuring GPIO,21,Output,,,,,,,,,
2,1,Setting GPIO,21,Output,1,0,,,,,,,
2,0,75,No playlist scheduled.,
2,0,75,No playlist scheduled.,
2,1,Configuring GPIO,21,Output,,,,,,,,,
2,1,Setting GPIO,21,Output,0,0,,,,,,,
I need some help with setting the timer code in red. I would like to turn on a relay
GPIO 21 and 90 minutes later it will turn off. The on/off part of the script works well, just need timer info to get the script to work.
Thanks
Colin