Proving that duct tape really can do anything, [StudentBuilds] uses it to make a workable controller out of a glove. To be fair, there are a few more bits too, including paper coated with pencil graphite and tin foil, which forms a variable resistor you can read with an Arduino analog input. You can see the entire thing in the video below.
The source code is simple at this point — eventually, he plans to control a robotic hand with the controller, but that’s later. However, there’s no promised link to the code in the description, so you’ll have to freeze frame and type. However, it is pretty simple — just read the analog pin values to determine the specific values for each finger.