3 Replies - 964 Views - Last Post: 17 September 2012 - 07:05 AM Rate Topic: -----

#1 jskidd3  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 57
  • Joined: 16-September 12

USB Device -> Visual Basic Program

Posted 16 September 2012 - 01:19 PM

Hello, I have quite a bit of experience in VB.net but one thing I've never approached is trying to make a USB device communicate with a Visual Basic program.

Here's an example of the sort of thing I'd like to create:
The user presses a button on an external USB device, the button sends the press to the USB and the Visual Basic program then executes a very simple piece of code like this:

MessageBox.show("USB device key was pressed!")


Would this be possible through Visual Basic? I'd really appreciate it if anyone could point me in the right direction.

Regards,
Joel.

Is This A Good Question/Topic? 0
  • +

Replies To: USB Device -> Visual Basic Program

#2 tlhIn`toq  Icon User is offline

  • Closing in on 5,000
  • member icon

Reputation: 4928
  • View blog
  • Posts: 10,465
  • Joined: 02-June 10

Re: USB Device -> Visual Basic Program

Posted 16 September 2012 - 04:38 PM

"A USB device" is totally vague. A printer, a camera, a USB 2.0 left nostril inflator, a USB coffee cup warmer, USB rocket launcher...

If it is a device you are making, then its all about how you are implimenting the hardware. There are lots of hardware kits for doing USB devices and they all work differently - but commonly require you to program a PIC of some kind to do whatever it is that the device does.

Some USB devices use the FTDI chip to have it look like a serial COMport. Under those conditions you could have a button that generates a serial port "a".

If its a device that is already out on the market, its up to the developer to let you know what is going on. You may never know that a button was pressed, but the driver knows to do something.
Was This Post Helpful? 1
  • +
  • -

#3 jskidd3  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 57
  • Joined: 16-September 12

Re: USB Device -> Visual Basic Program

Posted 17 September 2012 - 03:06 AM

View PosttlhIn`toq, on 16 September 2012 - 04:38 PM, said:

"A USB device" is totally vague. A printer, a camera, a USB 2.0 left nostril inflator, a USB coffee cup warmer, USB rocket launcher...

If it is a device you are making, then its all about how you are implimenting the hardware. There are lots of hardware kits for doing USB devices and they all work differently - but commonly require you to program a PIC of some kind to do whatever it is that the device does.

Some USB devices use the FTDI chip to have it look like a serial COMport. Under those conditions you could have a button that generates a serial port "a".

If its a device that is already out on the market, its up to the developer to let you know what is going on. You may never know that a button was pressed, but the driver knows to do something.


To describe the device a little more, just imagine a small button attached to a circuit board. This is more of a project, I just want to test if it can be done. USB 2.0 connectivity attached to a circuit board which is then connected via copper wires to the button, when the button is pushed it sends a signal to the Visual Basic program.

Do you know what kind of hardware I would need to do this? Circuit board? Wiring? My technical knowledge on this kind of hardware is very basic so please be as specific as possible.

I have attached a file of what the device would look like from above.

Thanks again,
Joel

Attached Image
Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Closing in on 5,000
  • member icon

Reputation: 4928
  • View blog
  • Posts: 10,465
  • Joined: 02-June 10

Re: USB Device -> Visual Basic Program

Posted 17 September 2012 - 07:05 AM

As I said, there are a lot of ways to do this.
You could use a keyboard controller board and button just sends a key.
You could use a mouse controller board and the button be the right-click.
There are joysticks out there with 15 buttons: Use a board from one of them.

There is a whole world of hardware experimenters out there. Googling "USB Button Interface", "USB BUtton circuit", "USB Button kit" etc. gets lots of project kits etc. for this sort of thing.
http://arduino.cc/fo...index.php/topic,17365.0.html
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1