|
Forum Index : Microcontroller and PC projects : Picomite as an HID keyboard
| Author | Message | ||||
| Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1654 |
I have a couple of projects where I would like to use a device to simulate a USB keyboard: A joystick to input "A,S, W, Z, space" or similar. An input device for a mini computer to drive a menu driven system (a simple HMI) using rugged buttons rather than a more fragile keyboard with many more buttons than are needed. This HMI would use MMBasic. I would like to use MMBasic on the Pico because I'm familiar with it but that does not seem to support the Pico being used as an HID device. While Circuit Python will do it, that's not really the way want to go because I would find it easier to add extra bells and whistles using MMBasic. Does anyone know how this could be done? Thanks Bill Keep safe. Live long and prosper. |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6424 |
This is cheap and should save a lot of work. Coupled with a picomite to read the buttons etc. https://www.electrodragon.com/product/serial-to-hid-keyboard-emulator/ I have a couple but apart from a quick test to prove they work, I haven't put them into use. Jim VK7JH MMedit |
||||
| Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1654 |
Thanks Jim, I did see that some time ago but was put off by the Chinese language on the config interface and was a bit suspicious that they wouldn't do what I want. I would still need a Pico anyway and if it comes down to that I may as well use a Pico with Circuit Python with a little bit of help from AI. Bill PS I should have said that the HMI does use MMbasic. Keep safe. Live long and prosper. |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8423 |
I've used a RP2040-Zero as a HID using Circuit Python. It works very well and I didn't need AI to figure it out! I'm not sure where my code is now, unfortunately, as it was ages ago when I was experimenting with making game controllers that no-one seemed to be interested in! I found snippets on the web. I'm not aware of anyone managing to use MMBasic for an HID even though the USB port can be run as a master. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| Arne Regular Member Joined: 05/01/2025 Location: GermanyPosts: 43 |
Hello Bill, You can use HID-Remapper on a second pico. It could be adapted/configured to your needs via browser and controlled by MMBasic thru the GPIOs. Here fotos of my actual prototype as IR-Controller. ![]() ![]() I actual made some tests to use it as a multi remote control. Without the second pico you can control the MMBasic editor e.g. with mouse or joystick etc. See also my post „Picomite & HID-Remapper“. Arne |
||||
Quazee137![]() Guru Joined: 07/08/2016 Location: United StatesPosts: 602 |
I have been making keypads to help with my right hand not working much. Here are two of my first runs at it. I have others but are more like adding custom key pad macros with mouse and game controller all in one. Quazee137 sometimes finding board files for Arduino and get the tools config right or close enough to make code work "bites" Have FUN Keypads ref.zip |
||||
| Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1654 |
Thank you all for the comments. It seems that I'm not the only one with a need or interest. Maybe a CSub for MMBasic would do it but that's probably beyond me. I'll go with the Circuit Python and Pi Pico option. AI has given me a program which I will check out eventually. I have no desire to learn Python. The idea of using indentation as part of the program structure just seems so wrong to me. Thanks Bill Keep safe. Live long and prosper. |
||||
| mozzie Senior Member Joined: 15/06/2020 Location: AustraliaPosts: 189 |
G'day, Arne, Many thanks for the link to the "Remapper" github, hadn't seen this before but have loaded up a Pico and it works plugged into the PicoMite with no problems. Also a nice piggy back solution you have there ![]() Turbo46, I too would love to see the ability to use a PicoMite as a USB I/O expander / keyboard or serial link plugged into another as a host, I believe this has been discussed in the past and is not as simple as it seems. My own testing with CircuitPython plugged into a PicoMite USB host doesn't work, the CircuitPython shows up as multiple devices on Windows and MMbasic doesn't recognize it as a keyboard or mouse, other peoples experience may vary, I'm no expert by a long shot. I would suggest trying the Remapper as suggested by Arne. The GPIO can be setup to send keystrokes / mouse functions or macros so should do as a simple keyboard no problems. Unless the Arduino IDE is an option Regards, Lyle. Edited 2026-01-04 14:27 by mozzie |
||||
bigmik![]() Guru Joined: 20/06/2011 Location: AustraliaPosts: 2975 |
Hi Bill, My option is a `little different' than those proposed but still requires extra hardware (a bog standard USB-TTL) adapter. There is a nice little program for a PC called DataSnip that intercepts a serial stream and patches the data into the PC' keyboard routine. The program is free and will just parse the data through as is, however if you want to filter out keys or convert them to a string or other features then the program needs to be registered and a $10AU fee (about $6US). >>> DATASNIP <<< All that would be needed is your Pico to transmit the ASCII codes of what keys you need to the USB-TTL adapter and set DataSnip up to intercept the relevant Com Port and away you go. Kind Regards, Mick (The Big one) . Edited 2026-01-04 15:47 by bigmik Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
| Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1654 |
Thanks Mick (The Big one), There are more options than I thought! Being a pig headed old sod, I'll try the Circuit Python way first and if the problems Mozzie mentioned occur and can't be fixed I'll decide which option to try next. Thanks all Bill Keep safe. Live long and prosper. |
||||
| dddns Guru Joined: 20/09/2024 Location: GermanyPosts: 726 |
TTL to Ch9329 |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8423 |
There are a lot of web sites showing how to use Circuit Python for HID on the Pico. If you are happy with MMBasic then I doubt if you'll have much difficulty with Circuit Python - it's not a difficult language. Just a few: PICO-HID scripter Simulating the computer mouse USB keyboard emulator Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| cosmic frog Guru Joined: 09/02/2012 Location: United KingdomPosts: 306 |
This one works well video Software Here Dave. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |