PDA

View Full Version : C++ Project



shrestha
04-30-02, 11:36 PM
Hi, I need to make a timing device which calculates the acceleration and retardation of a car as it moves along a track...well, I've made the calculating program in C++ in UNIX, and have it running....but I have used a circuit device which uses LED and which sends a character when the car passes through the LED, through the serial port. Now, My program is set such that it calculates the time difference between two inputs...and then calculates the acceleration....But I dont know how to set the input device to the serial port instead of the keyboard!!! My program works well when input is sent through the keybopard!!! Is there any way that I can set the input device to the serial port for a certain portion of the program...and then again to the keyboard after a certain portion?

Your help will be really really appreciated!!!

sjmarsha
05-01-02, 03:01 AM
Yes, Yes there is.

p.s. I do not know how to do it.