This was the first robot I had made at SAIC. I didn't know how to make an mechanism that would replicate the up and down movement of a handshake. I then realized that I could use a desk lamp to create that movement for me.
I attached an aluminum rod to a servo and mounted the servo to the lamp's aluminum base. I used PLA to 3d print a hand and secured a wire to the hand. The wire acted as a capacitance sensor that sent a value to the esp32 board which triggered the servo to move 180 degrees. This then became a handshake.