I'm new to using electronic boards, and have followed a guide online for printing a 6 DoF (degree of freedom) mouse. I'm stuck on an optional step that requires me to change the PID and VID of a "Arduino Leonardo" board.

I've located the appropriate "boards.txt" file, but I'm not sure which line to change. I've edited a few, but I'm worried I'll mess things up (a tutorial for it mentions they had destroyed 3 trying to rename it, and is back from 2009), and the ones I've changed do not result in a change.

I have checked out previous questions people have made regarding this topic, but quite frankly I can't understand the technical terms used in those.

This is the code in question I'm trying to compile, and lists example PID and VIDs as well.

I would love a clear explanation on which PID/VID I need to edit in the "boards.txt", so I can safely modify the board to be read as the space mouse in the code.

  • The Vendor ID (i.e. Logitech, Zerbra, ect) and Product ID (i.e. Specific Mouse made by Logitech, specific bar code reader by Zebra, ect) are values paid for by companies who manufacture USB peripherals. When you use one of these VID/PID combinations you are telling your computer "your device is their device". It's probably not on the up-n-up and you likely can't openly sell your USB product w/ "their VID/PID values". That said, you can probably make almost any VID/PID work on a Linux computer. On a Windows computer you probably have to masquerade as the USB peripheral you are imitating.
    – st2000
    Commented Nov 23, 2023 at 21:59
  • I see, that's understandable, selling products like that would fit pretty well under scamming and deceiving people. This is for a 3D printed project for my own personal use. Is it possible to change the right PID though, or is it sort of a territory where people aren't willing to openly discuss it since there's no real way to prove I'm not using it to mislead others?
    – 8foldhero
    Commented Nov 24, 2023 at 0:18
  • I don't see a problem doing this for personal use. Your question sounded like you didn't know what VID and PID numbers were used for. So, a little background. I'd write an answer ... but I'm still not clear if just knowing what a VID/PID number answered your question. As for bricking your Arduino, well, if there is only 1 USB on your Arduino and you change the VID/PID away from being a USB/CDC device, then the connected computer will likely not talk to it. But this has more to do w/with the processor (or USB interface device) used in your particular Arduino.
    – st2000
    Commented Nov 24, 2023 at 0:27
  • 1
    Welcome to SE/Arduino! Please take the tour to learn how this site works, and read "How to Ask". This is not a forum. Then come back and edit your question for clarification. -- I will not look into externally linked sources on some website. Can't you show a minimal example? -- The tutorial is not for the Leonardo, AFAIK the Leonardo does not use an FTDI chip for USB. -- What is this "boards.txt" you mention? -- Why do you need to change the VID/PID at all? -- Please provide a link to this "guide online". Commented Nov 24, 2023 at 6:50
  • 2
    I'm stuck on an optional step that requires me to change the PID and VID of a "Arduino Leonardo" board. - If it's optional and you are stuck, I suggest ignoring that step. If it's optional it can hardly require you to do it.
    – Nick Gammon
    Commented Nov 25, 2023 at 6:11

1 Answer 1


Leave "boards.txt" alone. It is wrong side of your goal.


leonardo.build.vid=0x2341     <--- here
leonardo.build.usb_product="Arduino Leonardo"

leonardo.build.usb_product="SpaceMouse Pro Wireless (cabled)"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.