Hi,
Please clarify:
I am looking for a way to measure the pressure on a push button when it is pressed
Reading this I thought you need a mechanical test construction.
But mind that there will be not only one "pressure" or "force", it may be a complete diagram, depending on what pushbutton you are talking about.
Many pushbutton have metal domes, this creates some hyteresis, then you have at least two forces: The "make" force and the "break" force.
(indeed there may be at least 4 values: before_make, after_make, before_release and after_release)
Pushbutton without metal domes will vary their "make force" with time, and environment. There will be oxide on the contacts and the thicker (older) the oxide you need more force to break through.
I intend to save it in the flash of a microcontroller.
This now is a completely different task.
***
I think we need more information.
What value or information are you interested in?
* is the pushbutton mounted on a PCB or not? Do you have access to the connection?
* what mechanical environment do you have? How to generate the force (electrically, air pressure...) is the mechanical construction very stiff or very weak and so on...
Maybe you can tell what´s the use of this all.
Klaus