Ok so i want to build a simple radar gun, but i need some help on how to go about this. I have a sensor that i broke from a photogate and that will be my radar. The problem i am having is how can i embed a program into the chip that will read and calculate data as an object passes by? (can i use C++?)
You will have a few problems. The principal of operation for a photogate and RADAR as used to measure speed are two different animals.
To accurately measure speed using a photogate you actually use a pair (or more) photogates. The output of a photogate is generally a pulse (a trasition from a logic high to low or low to high). The photogate uses a light beam which could be infrared, LASER, or as simple as a flashlight beam. The beam is ficused on a receiver. Let's say we have a transmitter and receiver.
When the beam is broken as an object passes between transmitter & receiver a pulse is generated. We can call it a "Start Pulse" and it can start a counter. Now if I place another photogate say 12" from the first when the object passes through the second unit it will generate a pulse. Let's call that a "Stop Pulse" and the stop pulse will stop the counter action. Since the two units are precisely spaced at 12" and I know the time it took for the object to travel 12" I can easily calculate the velocity of the object.
RADAR transmits pulses which bounce off an object and returns. RADAR has several flavors which we won't beat to death. I transmit a pulse out and wait for a return pulse. Then repeat the process. The difference in return times can be used to calculate the speed of the object I am bouncing pulses off of.
The software relies on an I/O (Input / Output) device to see the pulses. A Start and Stop command so to speak. We start a counter to count up and then stop the counter. That gives me a number I can use my software to manipulate.
A good example of using photogates is my skyscreens. I have three sensors equally spaced 12" apart. I fire bullets through them. I measure the time from the first to the second then from the second to third. I compare the results to see if the data is valid. If the two are close I assume the data was valid and store the data.
Anyway, aside from all that. You can't do what you want to do with what you have.