pwnagotchi
pwnagotchi copied to clipboard
gpio buttons
original Tamagotchi had buttons to interact, I'd like to be able to interact more and add features.
using gpio for buttons to run scripts - shutdown sleep (low power eg screen off but still working or slow refresh) run a specific attack like pixie dust. proximity sensor screen off view currently stored messages on screen
There's already a GPIO plugin. Have a look at https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/defaults.yml ;-)
found it after i posted, thanks for not yelling rtfm lol, ive been reading nonstop and making progress:)
On Tue, Oct 29, 2019 at 11:12 PM lexusburn [email protected] wrote:
There's already a GPIO plugin. Have a look at https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/defaults.yml ;-)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evilsocket/pwnagotchi/issues/458?email_source=notifications&email_token=AKLEA5DOQOFBLOSIOEHTYH3QRCRNJA5CNFSM4JGD6JOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECSDFOI#issuecomment-547631801, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKLEA5GFYZAKSSRSDQ3PCUDQRCRNJANCNFSM4JGD6JOA .
-- [image: photo] Michael Moloney Technician, ImplyIT
087 353 6576 | [email protected]
www.ImplyIT.co.za Create your own email signature https://www.wisestamp.com/signature-in-email?utm_source=promotion&utm_medium=signature&utm_campaign=create_your_own
FYI, https://www.instructables.com/id/Simple-Raspberry-Pi-Shutdown-Button/ works great; header pin 5, in the script use "gpio_pin_number=3" and 4 seconds of push will shut the system down gracefully. if you don't remove power, pushing the button again will restart the system.
Now all we need is a "shutdown" image for the ePaper displays so that we know it's officially on the shutdown path.
@lazee486 can you close this issue?
Total novice here. So if I got this right I would have to edit this part of the gpio_buttons.py file like this:
` def on_loaded(self): logging.info("GPIO Button plugin loaded.")
# get list of GPIOs and associated commands
gpios = {
X: "command1", # X = GPIO pin number, "command" = command for the button press
X: "command2",
X: "command3",
X: "command4"
}`
and then set the "main.plugins.gpio_buttons.enabled = true" in the config.toml file or is it just to simple to be true?
I'm trying to make this work on my Pwnagotchi running on a Pi Zero W with a Waveshare 1.44 LCD Hat SPI Display with 3 buttons and a joystick (https://www.waveshare.com/wiki/1.44inch_LCD_HAT).