Adapter

This project requires ESP32 CAM module. The code for a LAN camera server is avalible on github. The module requires 5V for power. To solve this instead of buying external power supply we can "steal" some power from Prusa MINI's LCD screen which is powered by 5V too. To do this we require some sort of adapter which will bypass all the power and signal pins for the display but it's going to let us connect to power pins (labeled: 5V and GND) to some sort of connector - I used a 2x1 3,5mm molex connector but you can modify the PCB to use whatever 2 pin connector suits your needs. It's also possible to ditch the connector entirly and solder some wires directly to PCB but I wouldn't recommend this because the connector looks better, it's easier to mount the whole thing later and it's easy to disconnect the ESP module at any moment. The PCB is double sided which is manatory in this case but not that hard manufacture at home if you don't mind spedning some time on it. I also used a SMT 2x7 goldpin female connector which is not a popular element and if you have trouble finding one you can use regular female goldpins cut to right size with their pins bend at a right angle.

Camera arm

As a camera arm I used a 3D model from Printables avalible here: 
https://www.printables.com/model/3407-articulating-raspberry-pi-camera-mount-for-prusa-m .
There are many stl files but the only ones you need are labeled as "...standard" , "...flink..." and "thumb...". As the first model you need to print "...standard" and mount it your Prusa's aluminium extrusion using 2 M3 screws and T nuts. As a next step, print some "flinks" and experiment how to connect them so your camera can be in the most optimum spot and while choosing a spot for your camera remember that Z axis motor can drive into your camera and damage everything - choose the spot whisely! At last you need a case for ESP. I highly recommend this one:
https://www.printables.com/model/191577-esp32-cam-housing .
Solder your wires to ESP's power pins and guide them though the case. Remeber to use long wires and cut them later. But how do you mount the case to the arm? I used one (random) "flink" model from before and sliced it in half in a slicer. This way one surface is flat and you can glue it to the case and the other side connect to the rest of the arm using thumb bolt and nut (models in first link). Finally guide the cables though the "flinks" to the adapter PCB while hiding them neatly along the way and you are done.

Remeber to double check the connections so you won't blow up your printer or ESP. If a printr's screen stays black after powering it up, then immediately turn it off and check adapter connections or possible short on PCB.