I wrote this as part of another project, but then I decided to use a Pro Micro which can be programmed directly from the laptop.
However, this might be useful someday (or to someone) so I will leave it here. :)
First of all, in order to program a Pro Mini with Arduino Uno, you have to take out the core chip of the Uno.
Then connect the pins as follows:
- 5V or 3.3V pin on Uno with VCC on Pro Mini (check which type of Pro Mini board you have on the back of the microcontroller)
- GND on Uno with GND on Pro Mini
- TX0 on Uno (pin 0) with TX0 on Pro Mini
- RX1 on Uno (pin1) with RX1 on Pro Mini
- Reset on Uno with Reset on Pro Mini
Connect the Uno to the computer/laptop and upload the desired program.
Make sure to select in Arduino IDE the right board - Arduino Pro Mini (5V with 328..., in my case).
Now, disconnect the Pro Mini from the Uno and connect it to the rest of the circuit.
Advice : check the program on the Uno before uploading to Pro Mini. In case there is a problem it is easier to fix and check again.