|
Forum Index : Microcontroller and PC projects : Picomite as an HID keyboard
| Author | Message | ||||
| Nimue Guru Joined: 06/08/2020 Location: United KingdomPosts: 427 |
ooohhh - What kind of IR reciever would I need - wouldn't it also need some sort of HID layer itself? Saw this on Git Hub (https://github.com/wagiminator/CH32V003-USB-IR-Receiver - but then back into coding something "not" 'mite. Never thought of IR. Edit: I think my challenge will be the host pc - I can't install software so I need to send USB HID commands. The IR route seems to need something at the PC end to interpret the signals. Edited 2026-01-12 00:01 by Nimue Entropy is not what it used to be |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8568 |
Well, yeah. The difference is that instead of using a wifi or BT input it would use a modulated IR receiver. Apart from that the HID side is the same. A PC can see a HID device as a keyboard, so it can poke, say, "W", "A", "S" or "D" into the keyboard buffer and the PC will react as if it's had those keys pressed. A USB joystick controller is also a HID device, but Windows sees it as that rather than a keyboard. If you stripped one down you could use GPIO pins to "control" the joystick using lovely clicky relays for a touch of authenticity. :) You could use, say, a Zero as the converter between IR and HID. Your software would run a loop to wait for a character from the IR sensor then send a character over HID. MMBasic supports IR TX and RX, but not being a HID master unless someone knows differently. Circuit python can probably handle both as IR has been around a long time. It's only a serial bit stream. Of course, other such things are available. :) If you use two IR LEDs in the transmitter, angled outwards a bit and driven by the same mosfet, you'd get a wider operating field. . Edited 2026-01-12 00:57 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5703 |
@Mick, IR keyboard is funny, but is not really robust. The IR protocols implemented in MMBasic are used for changing TV channels. And when you aim bad with your remote, you simply press channel-up again. That does not work for a keyboard. You would be agitated very soon (I know since I used one). But what is more, the IR remote keycodes are slow, a fast typist could crash the IR system easily (not me, I am more like 2-5 keys per second). Volhout PicomiteVGA PETSCII ROBOTS |
||||
| phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 3016 |
As this is a clicker emulating a keyboard speed is unlikely to be an issue so I think IR could be worth a try. At the clicker end use a MicroMite2 as it also supports IR. With sleep enabled it would cut the battery size. At the PC end another MM2 or PicoMite driving this :- |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8568 |
That Flirc device that I linked to appears as a HID device. You configure it to act as keyboard keys when it receives IR messages. It also learns the remote that you want to use so IR SEND should be ok. It has the disadvantage that it's 22 quid though. :( Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 3016 |
That looks like a handy device but Nimue wont be allowed to install its configuration software on the PC. It might work if it can be configured on his own PC and from then on appear to be a standard keyboard to a computer without the software. |
||||
| mozzie Senior Member Joined: 15/06/2020 Location: AustraliaPosts: 204 |
G'day, Once again, the Remapper software as suggested by Arne may be the solution depending on requirements. Assuming (here I go again) that the "Clicker" is a HID device that sends keypresses to the host PC, and its one of these that needs modifying: A switch can be added to a GPIO pin to select modes ie: normal and modified, if needed Plug the Remapper unit into the PC, plug the Bluetooth dongle into the Remapper. Program the Remapper on an "open" PC, although it is a webpage so might even work with the "work" PC's Once programmed, the Remapper is seen as a HID device so no software required, with the bluetooth dongle working through it. Of course, this is nowhere near as much fun as building it from scratch, and as suggested by Mick, there is a IR library for CircuitPython that looks interesting. Once again, to be able to achieve this in MMbasic would be awesome, but I reckon we are already spoilt with all the goodies we have. Regards, Lyle. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |