Pico KeyPad
Introduction: Pico KeyPad
Pico KeyPad is a must-have shortcut keyboard for your PC work. This keypad consists of 9 keys (you can add more no. of keys), the size of this 3x3 keypad is small and can be easily carried out. All this 9 keys can be programmed for any shortcut. 1003
You can use it during programming / Coding or during editing and more, all the software shortcuts are compatible with this keypad. In this written tutorial we a going to see how can we make it.
Thank You NextPCB:
This project is successfully completed because of the help and support from NextPCB. NextPCB is one of the most experienced PCB manufacturers in Global, has specialized in the PCB and assembly industry for over 15 years. Not only could NextPCB provide the most innovative printed circuit boards and assembly technologies in the highest quality standards, the fastest delivery turnaround as fast as 24 hours.
Guys if you have a PCB project, please visit their website and get exciting discounts and coupons.
Only 0$ for 5-10pcs PCB Prototypes：https://www.nextpcb.com/?code=Mukeshdd
Register and get $100 from NextPCB: https://www.nextpcb.com/register?code=Mukeshdd
See more info about PCB Assembly Capabilities: https://www.nextpcb.com/pcb-assembly-capabilities?code=Mukeshdd
Supplies
9 x Push Switches Non-Locking
1 x Raspberry Pi Pico
Step 1: 3D Printing
Download STL Files (Click)
* 3D Print the given 3D Models.
* Note: If you don't find the same Push Buttons as mine please design your own Keypad.
* Once the print is complete insert the pushbuttons and fix them with some quick glue.
Step 2: Circuit Connection
* Make all the connections as shown in the schematic diagram.
* Put the 3D-printed keys on top of the buttons using fast glue.
* fix the RPi Pico using some screws.
Step 3: Code Step 1
* Download Circuitpython File
* Hold the Bootsel button of the pico and plug it to your PC.
* Copy-paste the file into the Raspberry Pi Pico directory.
* The board will reconnect automatically.
Step 4: Code Step 2
* Download the GitHub repository
* Extract the file.
* Copy the adafruit_hid file and paste it in pico directory -> lib (in lib folder).
Step 5: Code Step 3
* Download the Thony and install it (Do watch some tutorials if you are a RPi Pico beginner).
* Open the Pico directory and open the code.
* Now go to Tools -> Options -> interpreter -> and select Circuitpython(generic).
* Copy-paste the given code into the editor and save it.
import time
import digitalio
import board
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
from adafruit_hid.mouse import Mouse
btn1_pin=board.GP2
btn2_pin=board.GP3
btn3_pin=board.GP4
btn4_pin=board.GP6
btn5_pin=board.GP7
btn6_pin=board.GP8
btn7_pin=board.GP10
btn8_pin=board.GP11
btn9_pin=board.GP12
keyboard = Keyboard(usb_hid.devices)
mouse = Mouse(usb_hid.devices)
btn1 = digitalio.DigitalInOut(btn1_pin)
btn2 = digitalio.DigitalInOut(btn2_pin)
btn3 = digitalio.DigitalInOut(btn3_pin)
btn4 = digitalio.DigitalInOut(btn4_pin)
btn5 = digitalio.DigitalInOut(btn5_pin)
btn6 = digitalio.DigitalInOut(btn6_pin)
btn7 = digitalio.DigitalInOut(btn7_pin)
btn8 = digitalio.DigitalInOut(btn8_pin)
btn9 = digitalio.DigitalInOut(btn9_pin)
btn1.direction = digitalio.Direction.INPUT
btn2.direction = digitalio.Direction.INPUT
btn3.direction = digitalio.Direction.INPUT
btn4.direction = digitalio.Direction.INPUT
btn5.direction = digitalio.Direction.INPUT
btn6.direction = digitalio.Direction.INPUT
btn7. 379