HID and pi pico

Hi, I have a question that might sound silly at first, but there is one thing I just don't understand. I saw on the adafruit site that hid is built-in circuitpython. My question is therefore the following: what exactly is hid, is it hardware or software? Because we are talking for example of the raspberry pi pico which has the hid integrated but at the same time the hid is built-in circuitpython so theoretically that works with any board that supports circuitpython. I am a little confused.

It is both. The microcontroller must have the capability, but the microcontroller alone doesn't do anything meaningful. You also need firmware running on the microcontroller.

For example, the Arduino Leonardo hardware has HID capability. But if you upload a Blink sketch, it is not doing anything with that capability. However, if you upload a sketch that does use the capability (one of the Keyboard library example sketches for example), then that hardware and firmware together become a USB human interfaces device class device.

That doesn’t really answer my question. I know obviously that a blink scketch doesn’t utilise the hid capabilities….
How come any BOARD can be utilised as a hid device when programmed with the right circuitpython library but is not advertised as a hid capable device like the pico. It makes me think that any BOARD with serial to usb CHIP is capable of acting like a hid device with the right programming. Am i wrong ? I also understand that it is actually the rp2040 CHIP that has built in « usb » capabilities not the board, right ?

Please provide a source to back up that claim.

Just because it has a HID library, doesn't mean the library works with all boards.

That said, most of the boards that are supported by CircuitPython also have HID capability. Not because they are supported by CircuitPython, but just because Python can only be ran on microcontrollers that have a lot of processing power, and the manufacturers of that class of chip almost always adds USB capability.

Please provide an example of one of these boards.

Well, technically most microcontrollers can do some crude form of bitbanged USB. For example, even the ATtiny85 has a bitbanged HID. But this bit bang implementation is not in the same class as true native USB peripheral support in the hardware.

But as for "serial to usb CHIP", no. The microcontroller must be connected directly to the computer, even when doing bit bang. You can't do HID through a serial to USB chip such as the CH340, FT232R, CP2102, etc. You can do it on the boards like the official Uno that have an ATmega16U2 as their USB chip, but that is only possible because that is a microcontroller with HID capabilities, and you are running the HID firmware on that chip. It doesn't mean the ATmega328P on the Uno is doing HID.

What do you mean by "the board"? The Pico is just an RP2040 on a PCB with some support components. Of course a piece of FR4, a handful of passives, and a flash chip don't have any built in USB capabilities.

"One of the things we baked into CircuitPython is 'HID' (H uman I nterface D evice) control - that means keyboard and mouse capabilities. This means your CircuitPython board can act like a keyboard device and press key commands, or a mouse and have it move the mouse pointer around and press buttons. This is really handy because even if you cannot adapt your software to work with hardware, there's almost always a keyboard interface - so if you want to have a capacitive touch interface for a game, say, then keyboard emulation can often get you going really fast!"

source : CircuitPython HID Keyboard and Mouse | Adafruit Feather M4 Express | Adafruit Learning System

I wasn't talkinbg about doing it with just the usb chip.

That's exactly what i was saying. The rp2040 has native usb support. It was a rethorical question.

So in definitve what i was saying was right.

That is a tutorial for the Adafruit Feather M4 Express. That board's microcontroller has native USB capabilities.

OK, have fun with that.

I see. So you are here asking questions, but you don't want answers because you already know the answers. So it seems your only intention is to waste the time of the people here on the forum. Classy.

OK, have fun with that.

When the answers are unclear and condescending I don't want them YES! You are an embittered man. Don't talk to me again.

You just told off an exceptionally knowledgeable user who is volunteers a wealth of information and experience to this forum.
If you plan on getting help here you should reread this thread and consider how you could have handled things differently.
I came here with a bit of an attitude too, but quickly rectified it when I realized that I was at fault.

I couldn't care less about what you are saying. You're not me i'm not you stop comparing. How does he expect me to reeact when his responses are mean, bitter and condescending ?! Treat people with respect if you want them to respect and listen to what you are saying.

And now I couldn't care less about you, your problems, or whether you ever solve them.
You'll go far with that attitude . . . hopefully you'll stay there too.

YOU was at fault. Doesn't mean I am. Take care of what concerns you we don't need you here.

Ahahah exactly what i was saying NOT YOUR PROBLEM so go off. Shush.

TOPIC SPLIT
PLEASE DO NOT HIJACK / NECRO POST !

Also a small timeout for being rude

Could you take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.