This project will show you how to make a composite USB device with 1 HID keyboard interface and 1 custom interface on raspberry pi pico (RP2040).
You can read more at my blog here
You must have Raspberry pi pico C/C++ sdk setup and pyusb library installed on your machine. Follow the instructions in the links given below.
git clone https://github.com/shekhuverma/Pyusb-RP-PICO.git
cd Pyusb-RP-PICO/device
mkdir build
cd build
cmake ..
make -j4
Now you will have a RP_PICO_USB.uf2 file in the build folder. You upload this file to your pi pico and run host.py
You will be able to see On Board LED blinking on the pico and when you will press the button on pico it will act as "a" key being pressed on your keyboard (You can see this by opening any text editor or browser)
- Add Micropython example