While I wait for the right moment to the test the SwishMaster on a court (which will be, hopefully, this weekend), here is a miscellaneous update on the project
Firmware
Firmware will have three main states:
- Calibration: in order to reliably detect the ball, I need no other obstacle is in the range of the USSMs. For this reason, firmware has a state where it reports, on the display, whether any obstacle is detected. This function is useful to help the user place the SwishMaster device in a proper position
- Levelling: not sure about how useful is this function, but I added a state where the firmware shows the horizontal alignment of the device
- Working: in this state, the firmware tracks the ball and compute trajectory parameters
Firmware logic is shown in the following flowchart

Data pre-processing
To avoid spurious readings, I applied the following pre-filtering logic. Every time I need a sample from the USSM, the following algorithm is performed
- Take 5 samples
- Remove minimum and maximum values
- Make an average of the remaining 3 values
In this way, the values sent to the trajectory computation block are more reliable and accurate
Tripod mounting
Besides the firmware, I also completed the assembly of the prototype. In particular, I built a mounting for a standard camera tripod. I used an aluminum hollow cylindrical bar. On one side, I press-fitted a bolt with a standard 20 UNC thread. This bolt will be screwed into the tripod

On the other side, I externally threaded the bar to screw in a bolt that secures the SwishMaster's base