![]() ![]() We do this by going to File > save copy and select the Pico. Now we need to save the code to the pico. Note you can only send 6 letters per loop. ![]() Time.sleep(0.1) This piece of code causes him to wait 0.1 seconds to repeat your code. Do you want to send a whole word? Then you put several Keycodes in a row like this: Keycode.M, Keycode.A, Keycode.K, Keycode.E, Keycode.R, Which finally makes "Maker" when you press the button. NB! You can only send 1 letter per Keycode. So you can change this letter into anything. The part kbd.send(Keycode.T, Keycode.O, Keycode.M, Keycode.O, ) contains Keycode.T, which means that we will send the letter T when we press the button. This is the most important piece of code we'll be modifying. In the part While True we look when the button is pressed, we will execute the part below. Kbd.send(Keycode.T, Keycode.O, Keycode.M, Keycode.O, ) The names of all pins are also on the Pico if you look closely at the photo. This indicates that we are using a pin on the Pico. And open it in Thorny.īutton1 = digitalio.DigitalInOut(board.GP10)īutton1.direction = Now download the code provided in this step. Now that we are in the Interpreter menu, click on the down arrow to select CircuitPython(generic). So that the microcontroller that we are going to connect in this way can understand this.įrom the taskbar, go to Run>Select Interpreter Now we are going to indicate in which code language we are going to code. Then copy the adafruit_hid folder to the Pico. Then go to Adafruit_CircuitPython_HID-main > adafruit_hid Install the HID Library that we are going to use in we are going to use to communicate from the Pico to the computer.Ĭopy the Zip folder to a separate folder. Here you are going to put files in the next step. Press and hold the Bootsel button (see photo above) of the pico and place it in the PC via the USB cable.Ĭopy and paste the file (adafruit-circuitpython-ras.) on the Raspberry Pi Pico which will show up as a USB device, Lasercutter or 3Dprinter (Or nothing if you don't want to make a case).Here are all the tools we're going to need for this Instructables: These are all the parts we need for this Instructables: If you have a Pico and a button you can also follow this tutorial without building the buttonholder. You will only have to follow the wood or 3dprint steps depending on your chosen method. You can make your button casing with my laser-cut wood file or 3dprint file. This tutorial is well tested on an audience with a beginner knowledge of soldering and coding. You can make in easy visualized steps a functioning Macro keyboard, Password keyboard, or anything that you can do with a keyboard.I am Tomodesigns and I do cool stuff on my Youtube and also Instagram! I am a dutch student with a passion for making and teaching others. This is the easiest Raspberry Pi Pico to Keyboard tutorial. ![]()
0 Comments
Leave a Reply. |