Solved

Programming to Control External Devices

Posted on 2007-03-21
6
573 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This is an explanation of a simple data model to help parse a JSON feed
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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 …

757 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

20 Experts available now in Live!

Get 1:1 Help Now