Solved

Programming to Control External Devices

Posted on 2007-03-21
6
589 Views
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
0
Comment
Question by:clebo99
6 Comments
 
LVL 2

Assisted Solution

by:_Eyeball_
_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 (http://www.keil.com/demo/ 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
0
 
LVL 6

Accepted Solution

by:
_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.
0
 

Author Comment

by:clebo99
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?

chris
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 6

Expert Comment

by:_iskywalker_
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.
http://www.ontrak.net/Programming.htm
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.
0
 
LVL 5

Assisted Solution

by:thegilb
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.
0
 
LVL 1

Assisted Solution

by:swiatlo
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
WordPress, WooCommerce, to Authenticate an online service? 2 83
WMI, model #, retrieving information 10 114
groovy example issue 10 89
Image decoding from Camera 3 72
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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 …

919 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now