Programming to Control External Devices

Posted on 2007-03-21
Last Modified: 2013-11-13
Hello Everyone,

Let's say I had an external device that connects to a workstation via USB/Serial/whatever.  In this example, let's make the device a "mouse-like" device but instead of the user moving the mouse,  n application would tell the mouse to move left/right/up/down (assuming that this device had that ability).

What is the most common programming language used to interface with an external device such as the one described?  Is there a general term for this kind of application development?   Is there any good links where I can get some of the basic information on how this is accomplished?

As always, thanks everyone.  Iove this site.

Chris, Baltimore
Question by:clebo99
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Assisted Solution

_Eyeball_ earned 50 total points
ID: 18763097
I think the device you're talking about has a microprocessor? In this case the therm for that you like to do is embedded systems. You have to download a development enviroment like keil ( the demo is enough for developing small applikations). You'll develop in C or Assembler if you prefer!

If you don't want to programm the microprocessor on the device first of all you have to know how to "talk" with the device. There're several ways to communicate with an external device in C#, Java or C++

best regards

Accepted Solution

_iskywalker_ earned 150 total points
ID: 18763182
normally if you have a usb, serial device if have already a protocoll, how to communicate with the device, Normmaly there are several ways of these bus: usb, serial, ieee1394, can-bus, etc. for programming roboters it was can-bus the most used. For webcams it was usb, and for camcoders and ipods it is firewire (ieee1394). The controling program language is irrelevant, the program most just know what to write and how to read from the bus. So every program language which support your operational system should work. you just must be sure it is fast enough (thats is why c and assembler are normally used).
Java is also used for mobile phones cause java can be ported easily for different environments without big trouble. So it depends on what exact configuration you have, generally i would recommand or c or java, since they are the most comman and easy to learn.

Author Comment

ID: 18763602
Wow....Thanks for the quick responses.....So, for a person like myself who is "somewhat good" at VB6/.Net2003, what's the best way to learn this? What "category" of book would I look for on say Amazon or at Barnes and Noble?

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.


Expert Comment

ID: 18763800
well if you use usb, you dont need a book, since you can read for a file, you must have a little understanding of protocols and exchange of information with protocols (tcp/ip for example). with serial, you must read and interpret the read data and write to the device file (i think there is enough tutorials on web). For usb there is also tutorials.
for visual basic, mostly it depends on the protocol for exchange, that is the main constrain.
Here a book about usb (i didnt read, but sounds good)
USB Complete: Everything You Need to Develop Custom USB Peripherals
most of these information you can find on the web, so search twice before you buy a book.

Assisted Solution

thegilb earned 150 total points
ID: 18778697
If you're considering making this hardware yourself you may wish to consider a very popular microcontroller called the PIC Microcontroller by Microchip. Somewhere like Maplins sells a very good starter kit to get you up and running called the PIC Flash Starter Kit. There is reading material available which will help you get started such as 101 PIC Microcontroller Experiments For The Evil Genius (Available from Amazon) which I have personally worked through and I can tell you it's a very nice and gentle introduction to working with this processor.

You can use the PIC to drive your motors and automate stuff. The Flash starter kit has all the hardware you need to get up and running with this including a little experimenter board so you can solder on components and test your circuits.

Some background knowledge in electronics might be useful too!

You may also find Serial Port Complete and Parallel Port Complete to be useful books because they will teach you some of the fundamentals of talking to hardware with low level API's. Also look at Programming the Windows Driver Model which will teach you some of the fundamentals of writing device drivers which are a (sometimes) more convenient method of controlling hardware.

Assisted Solution

swiatlo earned 150 total points
ID: 18908426
Hardware should be supplyed with some software, if you are to buy this "mouse" from somone else. A well documented library-interface to talk to the hardware must be given, for example a DLL file. You can link a dll to your VBasic application can't you?
Going into PIC's, assamblers, embeded systems, PCB design is totaly separet bruch of technology. If you are a software  you may end up at the university to master electronics :-)  Or at least spend 6 monts learning -- depend how deep you want to go with that project.

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Make the most of your online learning experience.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question