In reply to sruthikrapa:
Please use code tags to make your code easier to read. I have added them for you.
When you say something is “not working”, please explain in more detail what you expect to happen, versus what is actually happening. On what signal did you expect to see a pulse and what would it look like?