TomoDesigns
Published © CC BY-NC-ND

The Super Easy Pico Keyboard

This is the easiest Raspberry Pi Pico to Keyboard tutorial. You can make in easy visualized steps a functioning Macro keyboard.

BeginnerProtip1 hour11,101
The Super Easy Pico Keyboard

Things used in this project

Hardware components

Button
×1
Raspberry Pi Pico
Raspberry Pi Pico
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Laser cutter (generic)
Laser cutter (generic)
Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Custom parts and enclosures

Pico Keyboard Lasercut

Code

Single Button python

Python
#This tutorial is provided by TomoDesign / https://www.instagram.com/tomo_designs/ 
import time
import board
import digitalio
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode

kbd = Keyboard(usb_hid.devices)

# define buttons. these can be any physical switches/buttons, but the values
button = digitalio.DigitalInOut(board.GP10)
button.direction = digitalio.Direction.INPUT
button.pull = digitalio.Pull.DOWN

while True:
    # Push Keycode(The letter that you want to use Make sure that they are always Capital letters)
    if button.value:
        kbd.send(Keycode.C, Keycode.O, Keycode.O, Keycode.L,)

    time.sleep(0.1)

Long Sentences

Python
#This tutorial is provided by TomoDesign / https://www.instagram.com/tomo_designs/ 
import time
import board
import digitalio
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS

kbd = Keyboard(usb_hid.devices)
layout = KeyboardLayoutUS(kbd)

kbd = Keyboard(usb_hid.devices)

# define buttons. these can be any physical switches/buttons, but the values
button = digitalio.DigitalInOut(board.GP10)
button.direction = digitalio.Direction.INPUT
button.pull = digitalio.Pull.DOWN

while True:
    # If you push the button it while write the green part between(). \n is used for an enter
    if button.value:
        layout.write('Tomodesigns\n')

    time.sleep(0.1)

Credits

TomoDesigns

TomoDesigns

3 projects • 2 followers
Hi there, my name is Tom and I work under the name TomoDesigns. Check out I make designs in my free time.

Comments