I have a project where I need to be able to tempoarily disable script uploading to an Arduino pro micro. My plan for doing this was just to have a 10uF capacitor connected between reset and ground via a switch, so when I wanted to update the sketch I could just turn on the switch, do the update, then just turn the switch off again. However, I've tried doing this and I'm still able to update the sketch even when the capacitor is in place.
Do I need a different value of capacitor for this board? if that's not the problem is there another way to prevent the sketch from being updated that's toggleable? if not toggleable, what more permanent options are available?
If you get an ISP device like a USBasp or USBTinyISP you can upload sketches using the programmer. That upload does not include the bootloader so no serial uploads can be done until you use a programmer to burn a fresh bootloader.
If you only upload the sketch, it will overwrite the boot loader.
The IDE also might generate a sketch-plus-bootloader and upload that. So test after doing an upload using the programmer.
What was your reasoning to use a capacitor? On boards with native USB (like your Pro Micro) the reset pin is not used to reset the board when performing an upload.
I tried the capacitor because, naively, I thought it would work because it's something that worked before when I did it with an Uno board. I forgot that the Uno actually has a separate chip to handle the USB, and thus that's why that trick works there.