I'm building a somewhat elaborate costume, and needed some mechanical buttons to mount on 1/2 inch PVC pipe.
IMPORTANT NOTE: Fusion 360 imports STL files as cm, not mm scale. So, these need to be scaled to 0.1 (10%) to fit standard 1/2 inch PVC. (I've also included an export of the STEP files for CAD software. The free Fusion 360--for hobbyist use--can import these if you don't have anything else.)
This is a clip, so it snaps over top of PVC, and can move up and down, and rotationally--it doesn't need to slide on from the end. That fit my use case, but will have to be either glued or bolted/screwed into place. Your mileage may vary.
I remixed the center clip from the excellent tablet mount cited here.
Basically, I just smushed three of them together, and then made holes suitable for 12mm buttons. They fit perfectly and screw in nicely with hand pressure. I used these:
The buttons have a small metal ring and then a hex bolt. I found that the diameter of the mount was slightly too large to have both; they stay tightly with just the hex bolt.
As luck would have it, two of the holes are perfectly place for attaching a small joystick like that used by Adruino or Raspberry Pi. So, I left two spots on one version for screwing down a joystick. (Two other holes will need to be drilled by hand.)
No comments about my amateur soldering job....