Using a USB to serial adapter is _part_ of the problem but not all of it.
The stop character that the micro-controller sends to the PC: is it a single
character (or string of known length), or is it that followed by a line
terminator? If it is _not_ followed by the same line terminator as you have
configured the serial object to expect, then when you go to read the
character, the read will have to wait until it times out; if there is no
terminator, you should explicitly configure the serial port not to use a
terminator, and you should in that case probably use fread() to read the
character.
Likewise, if the microcontroller is expecting a terminator but you are not
sending one, the microcontroller level would either wait for-ever or would
time out. If the serial object is set up to expect a terminator and you are
not sending one, then the serial data might not be sent until the serial
object times-out the send.
USB to serial adapters compound the problem because they make it impossible to
send data asynchronously at the defined speed: the USB drivers will not
transmit to the adapter until there is a 40 ms pause in activity or until you
instruct the drivers to "push" the data out. (They are designed this way
because USB is designed for efficiency with larger blocks of data, not for
real-time work.)
I do not have any hints about the shape recognition; I would advise, though,
that it would be easier for us if you were to make available some sample
images and to describe the recognition problems you are seeing.
Walter Roberson <robe...@hushmail.com> wrote in message <i5p0db$r8b$1...@canopus.cc.umanitoba.ca>...
1. Install the operating system drivers for the camera. Check with
Device Manager (if in Windows) to verify that Windows can see your
camera
2. Run the software that came with your camera to verify operation of
your camera. If all this works, you're ready to try it with MATLAB.
3. Get the Image Acquisition Toolbox and install it.
4. Install any special MATLAB software provided by your camera
manufacturer (if any is required, might not be).
5. Run imaqtool
6. Click Preview and start playing around with the camera settings
(exposure, etc.).
7. Copy the code in the imaqtool command window to your code.
8. Roll out your code to the plant.
9. Start sorting objects on your transportation belt.
10. Earn big bucks and retire to Hawaii.
ImageAnalyst <imagea...@mailinator.com> wrote in message <95716929-b2b0-4493...@e14g2000yqe.googlegroups.com>...
> I just bought the Image Acquisition Toolbox and within one hour I was
> up and running, taking snapshots, so I'm sure you coulbe too. This