When module, sensor has golpins in standard 0.1″ raster as connector the best quick, yet sturdy connection can be made by female jumper wires.
But if You need to swap module to next one, even with the same pinout this can become problematic. How to make sure You are connecting wires again in the same, correct order? Well, sometimes You may make quick female connector from such jumper wires. There are two conditions.
First – it can not be too big. No problem with 1×5, 2×5 or similar. I guess this method won’t work for connectors like 2×20, but I did not try to make such :)
Second – You need to use all pins without “holes” between them. If You have one or two unused pins, You can still place there jumper wire and leave it not connected on other side, just to keep all wires aligned.
So, how to build such quick connector? Just connect all needed wires and use insulating tape to glue wires together.
You will be surprised how well it can work!