LowPowerLab Forum

Hardware support => ATXRaspi => Topic started by: Raymond Day on March 22, 2018, 09:14:29 AM

Title: How to use with other GPIO pins, with Monster Joysticks
Post by: Raymond Day on March 22, 2018, 09:14:29 AM
I got one of the "Monster Joysticks" and want to use the ATXRaspi on it. It will be nice to mount that button on it and the little ATXRaspi in side it too. The plug to the GPIO pins for the Monster Joystick uses GPIO pins 7 and 8 so I have to change them.

I did log on it and thought I set it to other pins by editing the /etc/shutdownirq.py to like this:

Code: [Select]
GPIO.setmode(GPIO.BCM) 

pulseStart = 0.0
REBOOTPULSEMINIMUM = 0.2 #reboot pulse signal should be at least this long (seconds)
REBOOTPULSEMAXIMUM = 1.0 #reboot pulse signal should be at most this long (seconds)
SHUTDOWN = 6 #GPIO used for shutdown signal: was 7
BOOT = 12 #GPIO used for boot signal: was 8

Saved and rebooted and it don't turn it off or reset.

Am I doing it right or is there another way?

GPIO pins 6 and 12 and just on the side of the Monster Joysticks board. So it's pins 31 and 32

What is the right way to do this?

-Raymond Day
Title: Re: How to use other GPIO pins?
Post by: Raymond Day on March 22, 2018, 10:37:04 AM
I did commands like this:

Code: [Select]
cd /home
wget https://raw.githubusercontent.com/LowPowerLab/ATX-Raspi/master/shutdownchecksetup.sh
chmod 777 /home/shutdownchecksetup.sh
nano /home/shutdownchecksetup.sh

Then changed 2 lines like this:

SHUTDOWN = 6                     #GPIO used for shutdown signal
BOOT = 12                        #GPIO used for boot signal

The 6 and 12 changed.

CTRL O to WriteOut and CRTL X to Exit.

Then ran it with:

Code: [Select]
/home/shutdownchecksetupsh

It had 3 options I picked 1.

1 Install INTERRUPT based script /etc/shutdownirq.py (recommended)

It works now! I tested it out and now can reset and turn it off with the switch.

So this my help others to know how to switch were the GPIO pins go.

It just installed it again with that script and I edit the script GPIO pin number before I ran it.

-Raymond Day
Title: Re: How to use with other GPIO pins, with Monster Joysticks
Post by: Felix on March 22, 2018, 10:49:44 AM
Raymond, Thanks for sharing your solution!