How to control external device through usb port
3 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
回答(1 个)
Image Analyst
2014-4-5
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 个评论
Image Analyst
2014-4-7
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?
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!