Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

purplelizzard

macrumors newbie
Original poster
Feb 8, 2007
28
0
Is there anyway to send data directly to a USB port? What I want to do is have a USB cable hooked up to a USB port and hook up a transistor or something like that to the cables coming out of it and write a program to turn the transistor on or off.

If this isn't possible with USB, what can I use to do this?
 

wittegijt

macrumors member
Feb 18, 2007
31
0
Eindhoven
Is there anyway to send data directly to a USB port? What I want to do is have a USB cable hooked up to a USB port and hook up a transistor or something like that to the cables coming out of it and write a program to turn the transistor on or off.

If this isn't possible with USB, what can I use to do this?

It is possible sending data to a USB port using IOKit. But your receiver also needs a USB controller, you can't communicate directly with a transistor. A solution would be a USB microcontroller using it's digital io ports. I have done this, and it works.

Wittegijt
 

purplelizzard

macrumors newbie
Original poster
Feb 8, 2007
28
0
Where can I get one and how do I do that? Also, is it possible to use FireWire or Ethernet instead? I suspect FireWire is the same as USB, but what about Ethernet?

thanks
 

wittegijt

macrumors member
Feb 18, 2007
31
0
Eindhoven
Where can I get one and how do I do that? Also, is it possible to use FireWire or Ethernet instead? I suspect FireWire is the same as USB, but what about Ethernet?

thanks

You are looking for something like this http://www.devasys.com/usbi2cio.htm. You can find cheaper solutions, I bought mine for €12. The documentation is usually for windows, but it is not that difficult to figure out. There are also kits for FireWire and ethernet, you can use all three (I have used only USB). Sample code is in /Developer/Examples/IOKit/usb if you have installed the developers tools.

Wittegijt
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.