| | |
Send data on a serial port
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Apr 2009
Posts: 5
Reputation:
Solved Threads: 0
owk ... den let me give u a bit more details regarding the project
i am building a multilayered car park model.now it will be totally an automatic one.The basic idea is i will use file handling in C programming to allocate spaces for car parking.When a car would arrive.the program would check for vacant slots in the car park nd would allocate it a vacant space.
now this is where the IR comes into play.Each parking space would have a wall behind it.nd on the wall would be mounted a IR sensor and on its side a beam givin out IR (i dont know what u call these).so when the car gets parked close to the wall the IR will be refected from the car to the sensor.nd when the car will leave the sensor will recieve ne reflected signal no more.so now it would send an indication to the C program to clear that parking slot.
now i must mention this is my first year in electronics engeneering nd i am not familiar with microcontrollers.Nd other than the language C ... i know C++ and Java.So this is my entire project details.At least to demonstrate the project i need 10 parking spots with 10 IR beams.
Plzz help me out if u can.... thnxx a ton ...
i am building a multilayered car park model.now it will be totally an automatic one.The basic idea is i will use file handling in C programming to allocate spaces for car parking.When a car would arrive.the program would check for vacant slots in the car park nd would allocate it a vacant space.
now this is where the IR comes into play.Each parking space would have a wall behind it.nd on the wall would be mounted a IR sensor and on its side a beam givin out IR (i dont know what u call these).so when the car gets parked close to the wall the IR will be refected from the car to the sensor.nd when the car will leave the sensor will recieve ne reflected signal no more.so now it would send an indication to the C program to clear that parking slot.
now i must mention this is my first year in electronics engeneering nd i am not familiar with microcontrollers.Nd other than the language C ... i know C++ and Java.So this is my entire project details.At least to demonstrate the project i need 10 parking spots with 10 IR beams.
Plzz help me out if u can.... thnxx a ton ...
•
•
Join Date: Sep 2006
Posts: 327
Reputation:
Solved Threads: 22
You could go with ten IR LEDS and ten IR phototransistors and use this simple circuit.

The output is high when an object blocks the infrared from falling
on the phototransistor or low when there is no object.
After that I'd personally go with a microcontroller and connect the ten outputs to 10 inputs, scanning them sending the data through the serial port every so often. There isn't an easier way really.

The output is high when an object blocks the infrared from falling
on the phototransistor or low when there is no object.
After that I'd personally go with a microcontroller and connect the ten outputs to 10 inputs, scanning them sending the data through the serial port every so often. There isn't an easier way really.
Last edited by Colin Mac; Apr 18th, 2009 at 10:03 am.
•
•
•
•
You could go with ten IR LEDS and ten IR phototransistors and use this simple circuit.
I've used the Sharp GP2D12 a while back in a small project I did, and I was very content with it. The only draw-back is that it outputs an analog voltage, so you would need to use 10 ADC's for 10 sensors and most (low budget) microcontrollers I've worked with only have 8 (or less).
•
•
Join Date: Apr 2009
Posts: 5
Reputation:
Solved Threads: 0
•
•
•
•
You could go with ten IR LEDS and ten IR phototransistors and use this simple circuit.
The output is high when an object blocks the infrared from falling
on the phototransistor or low when there is no object.
After that I'd personally go with a microcontroller and connect the ten outputs to 10 inputs, scanning them sending the data through the serial port every so often. There isn't an easier way really.
the circuit appeared simple enough ... but the thing is ... do i really have to use a micro controller ???
well in tat case .... plzzz plzz plzzz help me a bit more .... i really dont have much idea regarding ... microcontrollers(except just the knowledge tat u can program them wid WINAVR thru an USB cable nd they work as u want them to do) nd how to program them ( c'mon ... m just in my first year....started off wid electronics just a few months back) .... so .. if u could help me out in dat part i wud be grateful ..... if u can refer me a site which shows a similar circuitry ... tat will also be grt ...
thnx a ton .. once again ..
cheers ...
•
•
•
•
but the thing is ... do i really have to use a micro controller ???
And here's another link you might want to read.
![]() |
Similar Threads
- Send data on a serial port (C++)
- Serial port communication using C++ (C++)
- Sending data to serial port (Visual Basic 4 / 5 / 6)
- How can i collect and send data from SERIAL and Ethernet port to V.B.? (Visual Basic 4 / 5 / 6)
- send data with modem (Java)
Other Threads in the C Forum
- Previous Thread: Need to Fix this
- Next Thread: Using pcap, dirent.h and error C2085, C2061
Views: 5620 | Replies: 28
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays asterisks binarysearch calculate centimeter char command convert copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax directory dynamic executable fflush file fork forloop frequency getlasterror givemetehcodez graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators infiniteloop kernel km lazy linked linkedlist linux linuxsegmentationfault list lists locate logical_drives match matrix microsoft motherboard multi mysql number open opendocumentformat opensource owf pattern pdf performance pointer pointers posix problem probleminc program programming radix recursion recv repetition research scanf scheduling scripting segmentationfault send sequential shape socketprograming spoonfeeding stack standard string strings structures student systemcall testautomation turboc unix user variable voidmain() wab win32 windows.h






