I created this LEGO compatible Raspberry Pi mount so that I can add it to my BrickPi robot. You can use two pins or axles to close the lock. You can download the latest version of the 3D model from Autodesk and you may need Fusion 360 to work with the file. An optimized version for for affordable 3D printers is also available. I increased the tolerances in this model. I also uploaded it to GrabCAD.
A technical drawing of the model is also available:
Raspberry Pi Lego Camera Mount Drawing by Christoph Bartneck on Scribd