How to control external device through usb port

1 view (last 30 days)
i am doing an automatic numberplate recognition system for acces control, i want to interface a motor controlled barrier, which will be triggered by a command to the usb port of the computer if a particular plate is recognised in a database and is allowed in. what commands can i use to trigger the external device? #clueless!

Answers (1)

Image Analyst
Image Analyst on 5 Apr 2014
Model of what ? What is the "external device" ? Is it a camera? A bar code reader? And what is the "(toy) boom" you're going to attach to it? Do you mean boom like a loud sound (like your toy explodes) or a boom like a movable horizontal arm used for hanging things? Do you want a camera (the device) to read the license plate number off a toy car, and then look it up in a database, and if the car is authorized, to lift a a crossing guard arm (the boom) to let the car proceed to drive forward? Just a guess since I can't figure out what you're trying to say.
  6 Comments
Image Analyst
Image Analyst on 7 Apr 2014
Nakk, obviously unless you have the same device I have, the code won't work for you. Your device is almost certainly different. You'll have a different DLL. My code is just an example of how it is done. Obviously you'll have to make modifications for your device.
An RS232 is probably not easier. In fact since computers don't come with those kinds of ports anymore you'll have to get an USB to RS232 converter and install some software, which can be done (and I have done it), but why bother since you have a USB device?
Nakk Mungofa
Nakk Mungofa on 20 Apr 2014
thanx for the support hey! i resorted to using USB to RS232... and i have been able to run a motor by sending a string through the serial port to a very small PIC external circuit which is able to run a motor... i will still look into the DLL method though for interests sake!

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!