Skip to content

Instantly share code, notes, and snippets.

View Veticus's full-sized avatar

Tim Veticus

  • Aarhus, Denmark
View GitHub Profile
@Robotto
Robotto / buttonRefresh.py
Created January 22, 2020 07:52
Emulate keyboard from GPIO
#buttonRefresh.py
#by robotto - november 2016
#reads a button on a pi and executes a call to xte with
# a key sequence.
# sudo apt-get install python-rpi-gpio python3-rpi.gpio
from subprocess import Popen, PIPE #to call xte
import RPi.GPIO as GPIO #for button
from time import sleep #for debounce