• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

stuff to do with a USB cord and BASIC programming?

DanFungus

Diamond Member
I just finished ComSc 101, and we did a little BASIC programming in it (first programming I've done other than than html, or chnaging php stuff and Apache stuff). Since I busted my logitech mouse, I have the USB cord that came with it (has the male end for the computer and the other end is where it plugged into the circuit board inside the mouse). What I'm wondering is if anyone has done anything similar to make it do something on the other end of the USB cord...like

make a program with a button in VB, click on the button to "turn on a light" and have a blue LED on the other end of the USB cable that turns on when you do it...is this even possible without like drivers on anything to tell the computer where to send the signal?
blah...just staretd thinking about it
 
Problem is visul basic is too high level. It doens't work at the device level at all.

What you could do is get a PIC kit from a electronics store on the web. PICs are a sort of microcontroller family that can be programmed with basic. But this all cost money.
 
Originally posted by: zephyrprime
Problem is visul basic is too high level. It doens't work at the device level at all.

What you could do is get a PIC kit from a electronics store on the web. PICs are a sort of microcontroller family that can be programmed with basic. But this all cost money.



thier is no way to do it at all??

i'm sure that if he wanted it bad enough thier is a way.
 
interesting...would it have to be done in something like assembly? that'd be really neato if it's possible with VB and nothing else required, but, I doubt that it'd be that easy
 
Code

Found this after a quick search. If this doesn't do what you want, try to find a DLL that exports functions to Windows apps (i.e. VB apps).
 
Originally posted by: KingNothing
<a class=ftalternatingbarlinklarge href="http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=33181&lngWId=1" target=blank>Code</A>

Found this after a quick search. If this doesn't do what you want, try to find a DLL that exports functions to Windows apps (i.e. VB apps).
woah! thanks!! I'll check it out, and see if I can understand it 😱
haha, thanks though!

 
hmm...KingNothing, have you used that? It says that it can control Serial, Parallel, USB, joystick and Infared, but how do I change it.....it comes up as what looks like only Parallel. I'm clueless as to how to use it, and I've stared at the readme, but, still don't get it 😕
 
Apparently the DLL needed by this program isn't included. You can find it here.

In Windows 2000, if you open Device Manager, choose View--Resources by Connection, and look at Input/Output, then the PCI bus, you'll see the various memory addresses of your ports. I'm not sure how this works with USB, you'll have to do some further reading.

He hardcoded the parallel port memory address &H378 in his program. If you want to write to other ports, you'd need to provide a different memory address.
 
Back
Top