Maker Pro
Maker Pro

switch for my room

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
A USB to parallel port adapter (or vice versa) wouldn't do the job. This kind of adapter is menat to adapt the data from PP to USB. But it is not the data we need, but the presence (or absence) of USB power. I don't think you can control the USB power of such an adapter via the PP:

Harald
 

jones

Mar 31, 2012
11
Joined
Mar 31, 2012
Messages
11
wait. I created a program in java a couple of years ago. but not all are written by me. the "jnpout32.dll" was downloaded somewhere over the web (I just can't remember). The "DB25java.java" was entirely written by me from scratch. You can use and modify it if you wish.

I am planning to rewrite the whole thing in C# so that you just double click to use it...

here it is...


how to use the program?
you need at least java runtime environment or better yet the java development kit for java developers.

you need to set your environment variable. I have a tutorial in windows on setting the environment variable. WE ONLY FOCUS ON THE VARIABLE PATH. Just read the first part of this

Now, open cmd by going to start > run then type cmd
go to the directory where you saved the files... (i.e. C:\temporaryfolder <<--- in this case, type cd C:\temporaryfolder)

finally type java DB25java

then you should see this text
Usage: java DB25 [options]
where options include:

-p (value) specify input/output port number (else 0x378)
-d (value) delay in miliseconds (else 100)
-v verbose screen output (talks alot... else silent)
-e reads entered number from keyboard (ignores -b and -d)
-b (effect) BUILD-IN effects mode
where BUILD-IN values are:

1 reset all to zero and exit
2 reset all to one and exit
3 count zero to two-five-five then exit
4 blink on and off loop
5 round-and-round left-to-right loop
6 police lights loop effect 01
7 police lights loop effect 02
8 random values

you may want to type java DB25java -e
to enter numbers manually,
or type java DB25java -b 8 -d 25
to light the L.E.D. bulbs in random... Yes, currently, I am using low powered L.E.D light bulbs!
the character 8 there means random, the 25 there means 25 milliseconds delay.

Goodluck!
 

Attachments

  • DB25java.zip
    52.5 KB · Views: 60
Last edited:
Top