how to gain the data from IR TV REMOTE

what is the code for gaining the button frequency from tv remote

Look for libraries IRremote or IRLib

Make sure you have the IRremote Library installed.
Open the example IRrecvDemo.
Change the pin you have the IR detector plugged into.
Download to arduino, while still staying connected via USB.
Open the Serial Monitor.
Click on a button with your TV remote.
A hexadecimal value should pop up on the serial monitor.
Note which value pops up for which button, then use this to integrate that into your project sketch.

If a value does not pop up, chech that the remote is sending a signal. The best way to do this is hold a smarphone camera in front of it. Click a button, and you should see red flashing on the screen of your phone. This is because the phone camera is not exactly like our eyes, and it can pick up IR frequencies.

If your remote is lighing up in the camera, and still not printing a value to the serial monitor, you likely have two different ranges for LED and detector. Make sure they have the same wavelength. If not, grab some matching ones and try again.

IR transmitters and receivers must match. They are more than IR LED and transistor.

he best way to do this is hold a smarphone camera in front of it. Click a button, and you should see red flashing on the screen of your phone. This is because the phone camera is not exactly like our eyes, and it can pick up IR frequencies.

This is no longer true for many new smartphones - they have IR filters that block IR light.

BASITH_KAMAL:
what is the code for gaining the button frequency from tv remote

It's "google". But you have to know how to use it.

Here's a couple of good links :

https://arduino-info.wikispaces.com/IR-RemoteControl

=====

There are 10s of videos, here's one I plucked at random