I'm not sure if your stick will have exactly 1/8th of the inner circumference for each of the 8 directions, but you can build a test panel to check it.
- Mark the center point of where you plan to mount the joystick.
- Use a compass to draw a circle around that center point. Circle should be large for greater accuracy in measuring.
- Mark the 0 degree point on the circle using an L-square aligned to the edge of the panel and the center of the circle.
- Without changing the radius of the compass, put the point of the compass on the 0 degree mark and mark where the compass arc crosses the original circle. (+45 degrees)
-- Next, put the point of the compass on the +45 degree mark and mark where the compass arc crosses the original circle. (+90 degrees)
-- Repeat until you have marked 0, 45, 90, 135, 180, 225, 270, and 315 degrees.
- Bisect the 45 degree angles using the process for bisecting a 90 degree angle in this video. This will mark the 22.5 degree angles.
- Drill a small pilot hole through the 0 degree mark on the circle. This will let you orient the joystick base on the bottom of the panel to the markings on the top using an L-square.
- Mount the joystick centered on and oriented relative to the circle you drew using one of these two methods.
-- Drill a hole the diameter of the joystick shaft through the center. Put the joystick shaft through the center hole and mark the mount holes for the joystick. Remove the stick and drill out the center hole to the proper size.
-- Drill a hole in the center that is the proper size. Use a 3d printed collar to hold the shaft exactly in the center of the hole while you mark the mount holes for the joystick.
- Wire the joystick and either bring up the joystick tester in Windows Control Panel (gamepad firmware)
or use a keyboard test program (keyboard firmware) to see when switches are open/closed.
- Use a loop of string to pull the lever around the circumference of the restrictor. See if the transition between cardinal directions and diagonals happens at the 22.5 degree marks.
Scott