modulaire / RPi-Pico-HID-Keyboard

Using a Raspberry Pico with CircuitPython we can have a micro-controller behave like a traditional keyboard when connected to a computer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RPi-Pico-HID-Keyboard

Much like the Makey Makey, or an Arduino Leonardo, using a Raspberry Pico with CircuitPython we can prepare a device to behave like a keyboard when connected to a computer.

You must use CircuitPython 7.0.0 or higher in order for the included codes to work. After installing CircuitPython on the Pico, simply copy the codes boot.py and code.py to the device. Also copy the entire folder titled adafruit_hid. With several buttons wired up to designated pins you should immediately see results after unplugging, re-plugging the Pico and opening a basic text editor on your computer.

All pins and keyboard character mapping are found in the file code.py
All buttons/switches added to the device are to be connected to ground. Internal Pull-Up resistors are activated in the code, so no need to add them in your circuit

You will need to add a button to GPIO pin 0. To edit your code on the Pico, this pin must be pulled LOW when connecting the device to your computer. Otherwise you will be locked out and the device will behave only as a keyboard.

references:

adafruit_hid module for CircuitPython (github page)

adafruit: customizing usb devices in circuit python

CircuitPython download for Raspberry Pico

DIY pico mechanical keyboard (code was taken from here)

About

Using a Raspberry Pico with CircuitPython we can have a micro-controller behave like a traditional keyboard when connected to a computer.


Languages

Language:Python 100.0%