This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# PIR_ESC.py | |
# url: https://gist.github.com/glafranceri/5df7db9b64ed1a27a1f8cc8f46b772d2 | |
# written by glafranceri@gmail.com | |
# This script is licensed under GNU GPL version 2.0 or above | |
# PIR_ESC.py needs uninput and RPi.GPIO to work | |
# Script needs to be run as root from the command line using sudo | |
# Press [Ctrl] + [C] to exit script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import RPi.GPIO as GPIO | |
from time import sleep | |
# Set GPIO pin numbers to Board numbers | |
GPIO.setmode(GPIO.BOARD) | |
# Define PIR to be 10 | |
PIR = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import uinput | |
from time import sleep | |
device=uinput.Device([uinput.KEY_H, uinput.KEY_E, uinput.KEY_L, uinput.KEY_O,]) | |
sleep(2) | |
device.emit_click(uinput.KEY_H) | |
sleep(2) |