Skip to content

Instantly share code, notes, and snippets.

@omiq
omiq / usb_keyboard.py
Created July 20, 2018 02:21
Raspberry Pi USB keyboard emulator
import time
import RPi.GPIO as GPIO
# We are going to use the BCM numbering
GPIO.setmode(GPIO.BCM)
# Set pin 26 as input using pull up resistor
GPIO.setup(26, GPIO.IN, pull_up_down=GPIO.PUD_UP)