I moved your topic to an appropriate forum category @rchandrashekar.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
Take a search engine of your choice and ask the WWW for ' State Change Detection (Edge Detection) +arduino' to collect data to be sorted out to get the needed information.
i did try the state change : the issue is the rising and falling edge pulses are in Micro seconds and the state change pulses never capture the signal pulse.
It would great if i can get leads on Timer capture rising edge trigger for ESP/Wemos