moryoav
Posts: 13
Joined: Tue Jul 08, 2014 8:44 am

Grove Gesture Sensor (PAJ7620u2) + Power Button

Wed Apr 17, 2019 5:13 am

I'd like to connect a hand gesture sensing module, like this:
https://github.com/eouia/MMM-GroveGestu ... G_0747.jpg

I'm already using GPIO3 for my power switch with a button that shorts GPIO3 + GND.
If I want to keep using the power switch, what are my options? Can I connect both the gesture sensor AND the power button to GPIO3? Multiple devices on the same GPIO pin, will that work or will it fry my pi?

Thanks.

scotty101
Posts: 3649
Joined: Fri Jun 08, 2012 6:03 pm

Re: Grove Gesture Sensor (PAJ7620u2) + Power Button

Wed Apr 17, 2019 8:27 am

You can't use both the sensor and the button on the same GPIO pin.

Swap the button on to another GPIO pin. See this site (https://pinout.xyz/) to figure out which GPIO pins are available.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

moryoav
Posts: 13
Joined: Tue Jul 08, 2014 8:44 am

Re: Grove Gesture Sensor (PAJ7620u2) + Power Button

Wed Apr 17, 2019 8:30 am

I apologize, I wasn't clear enough. The button is not (just) power-off button, it's also power ON. and for that I thought the only way was to short pins 5 and GND. I followed this guide:
https://howchoo.com/g/mwnlytk3zmm/how-t ... spberry-pi

scotty101
Posts: 3649
Joined: Fri Jun 08, 2012 6:03 pm

Re: Grove Gesture Sensor (PAJ7620u2) + Power Button

Wed Apr 17, 2019 8:35 am

Its a pain. See viewtopic.php?t=225832

GPIO3 can be used to wake the Pi as the I2C interface isn't active when the Pi is in it's halt mode but it can't be used as a shutdown pin because the grove sensor needs to use the I2C interface.

You can have two buttons, one to wake and one to shutdown.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

Return to “Automation, sensing and robotics”