Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


How to set-up GPIO output status
#3
You could try a little hacking.

Add these 3 echo lines to the beginning of /var/www/daemon/watchdog.sh like below.
Code:
.
.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
echo "17" >/sys/class/gpio/export
echo "out" >/sys/class/gpio/gpio17/direction
echo "1" >/sys/class/gpio/gpio17/value
.
.

Add these 3 echo  lines to the beginning of the if block in /var/local/www/commandw/restart.sh
Code:
.
.
if [[ $1 = "poweroff" ]]; then
   echo "17" >/sys/class/gpio/export
   echo "out" >/sys/class/gpio/gpio17/direction
   echo "0" >/sys/class/gpio/gpio17/value
.
.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
How to set-up GPIO output status - by recce - 04-09-2023, 10:27 PM
RE: How to set-up GPIO output status - by recce - 04-10-2023, 12:23 PM
RE: How to set-up GPIO output status - by Tim Curtis - 04-10-2023, 12:25 PM
RE: How to set-up GPIO output status - by recce - 04-10-2023, 12:30 PM
RE: How to set-up GPIO output status - by recce - 04-10-2023, 01:12 PM

Forum Jump: