Hack your usb missile launcher into an "Auto-aiming autoturret!" by toelle
How to make your usb missile launcher aim on it's own.
This instructable will teach you to turn your usb missile launcher in an autoturret which will find and aim at IR targets. (sorry only IR targets)

Step 1: What you need!

wiimote.jpg
usbmissilelauncher.jpg
What do I need?

You need:

1 wiimote:
a bluetooth enabled pc
1 Usb missile launcher (duh!)
Ducttape
GlovePie (Programmable input emulator) You can download glovepie from: http://glovepie.org/poiuytrewq.php
A little bit of programming experience (not really necessary but, helps you understand the programming part better)

Step 2: Preparation

Use ducttape to fasten your wiimote on the top of the missie launcher. Make sure the missiles are still able to fire. The wiimote should point forward, and be placed in the middle of the missile launcher like on the picture. Be sure not to cover the 1 and 2 buttons on the wiimote, because you need to be able to press them in order to connect them to your PC (see next step).

Step 3: Connecting the Wiimote

Now connect your wiimote to your pc. If you already know how to do this, you can skip this step.

If you are using bluesoleil do this: Open bluesoleil and press the red/orange ball in the middle of the screen, this will make your pc scan for bluetooth devices. While your pc scans, press and hold the 1 and 2 buttons on your wiimote (the LEDs should now start blinking) when your computer finds your wiimote you can release the buttons again. The wiimote device should appear on your bluesoleil screen as something like "Nintendo RVL-CNT-01" or something like that. Now double click the new wiimote device your pc found. This will make it scan for possible services. The mouse icon should now turn orange. Click the mouse icon. If the wiimote icon turns green you have successfully paired your wiimote to your computer.

Step 4: Programming part1

With your wiimote properly connected to the computer you should be able to use glovepie scripts with it. Open GlovePIE and enter this:

debug=wiimote.dot1x

if wiimote.dot1y<462 then keyboard.Down=true else keyboard.Down=false
if wiimote.dot1y>562 then keyboard.Up=true else keyboard.Up=false

if wiimote.dot1x<462 then keyboard.Left=true else keyboard.Left=false
if wiimote.dot1x>562 then keyboard.Right=true else keyboard.Right=false


The first line isn't really necessary but it helps you see if your wiimote works properly.
The 2 next lines handles the horizontal aiming. and the last 2 handles the vertical aiming. It does this by pressing the right buttons in the missile launcher software based on where the IR target is. If your missile launcher software uses anything other than the arrow keys for aiming, you will need to tweak the code.
If you have more than one wiimote connected to your pc, then replace the "wiimote" with "wiimote" followed by what number wiimote you want to use. For example, if you use your second wiimote for this you would write "wiimote2". If you are unsure about what number you should use, just put "wiimote" without the number there and GlovePIE will most likely figure it out by itself.

Step 5: Programming part 2: Shooting a missile

The following lines of code will take care of the Shooting mechanism.
Now at the end of the script add this:

wiimote.Led1=wiimote.dot1vis
wiimote.Led2=wiimote.dot1vis
wiimote.Led3=wiimote.dot1vis
wiimote.Led4=wiimote.dot1vis


This will make the LEDs on the wiimote light up whenever it can "see" an infrared light. This makes it easier for you to see if the wiimote receives any IR signal.

Now we are going to add the shooting.
This is going to be a little more complex than the previous lines of code, but i hope you understand it. At the end of the script add the following:

if wiimote.dot1vis=true then {
if wiimote.dot1x>412 and wiimote.dot1x<612 and wiimote.dot1y>412 and wiimote.dot1y<612 then {
keyboard.Enter=true
keyboard.Enter=false
}
}


The first line checks if the wiimote can "see" any IR signal. The 2nd line checks if the IR light is in the center of the wiimotes "field of view". If it is, the launcher should be aimed correctly, and the launcher will shoot a missile. If your missile launcher software does not use Enter for firing the missiles, you should change "keyboard.Enter " to whatever key your software uses.

Step 6: Finished

Now you have a fully autoaiming wiimote/missile-launcher turret.
Open your missile launcher software, and connect the missile launcher. If you've set up everything correctly, you can go ahead and start the GlovePIE script by hitting run, then switch over to your missile launcher software and watch as the missile launcher aims and shoots at IR targets.
It will be able to aim at anything that emits InfraRed radiation, like a candle, remote controller or the wii sensor bar. If you run into any problems or have a question for me, leave a comment or send a private message, and I'll be glad to help.


1-40 of 183Next »
lego mindstorms says: Jan 22, 2013. 5:50 PM
you mean to combine the three scripts right?
Matrix-technician says: Apr 4, 2011. 9:30 PM
Where can i get a launcher like this besides ebay?
Roshy10 says: Apr 3, 2012. 12:46 PM
http://cpc.farnell.com/thumbs-up/usbmis/usb-missile-launcher/dp/LH00842?Ntt=usb+missile+launcher
frostybob says: May 20, 2011. 7:20 PM
I have a Lego Mindstorms 2.0 kit. Just wondering that because it has a IR function on it could the turret track the mindstorms brick??
dremeldude says: Apr 1, 2011. 4:50 PM
This would be cool if you put an ir led on a rc helicopter and try to outfly the launcher
account3r2 says: Oct 16, 2010. 8:24 PM
will this work with the think geek one?
toelle (author) says: Oct 17, 2010. 5:30 AM
This one? http://www.thinkgeek.com/geektoys/warfare/8a0f/

Well the missile launcher itself should work the same way, but maybe the software is different and you might have to tweak the code a bit, but it should work fine.
account3r2 says: Oct 17, 2010. 1:03 PM
what one did you use?
rirdrifta says: Aug 17, 2010. 2:14 PM
Hello I have an ideo you can get some face detection soft ware for the computer than put camera instead of a wii reomte than when the camera has detected a face than the missle launcher can fire. Any thoughts?
sam1997 says: May 24, 2010. 7:49 PM
you could always do the easy thing and get this
http://www.thinkgeek.com/geektoys/warfare/8bc4/
toelle (author) says: May 25, 2010. 7:00 AM
That thing is not autoaiming like this one (it could be tweaked the same way though). What you are linking to is the exact same missile launcher as the one in this instructable, except that it has a laser pointer.
Chowmix12 says: Mar 6, 2010. 9:17 PM
Wait, aren't laser pointer infrared? You could just point a laser at a target and have it track it and fire.... that would be awesome... 
shakespeare1212 says: May 9, 2010. 9:15 PM

No, laser pointers are not infrared. They are red, or some green. If you don't mind ruining your Wii Remote, you can take the IR filter off the front of the camera, and then a laser pointer can work, or so I've heard. I've never tried it myself.

Chowmix12 says: May 12, 2010. 6:52 PM
then, whats with the big red "infrared radiation" warning labels? has anyone given it a try?
A.J. says: May 22, 2010. 3:48 PM
no offense but the warning on low power devices such as these are mostly bs. that is unless a fool is dumb enough to hold a magnifying glass up to it :-) which i am assuming most of us won't do (just some info, so no offense)
Chowmix12 says: May 22, 2010. 6:26 PM
makes sense because infrared is invisible to human eye... but has anyone ever tried it? who knows.. it just might be able to be detected by the wiimote..
toelle (author) says: May 22, 2010. 5:06 PM
Yea, low power lasers are pretty harmless. Your blink reflex will be triggered long before your eye takes any notable damage. However, those IR lasers in CD drives and such ARE pretty dangerous! Dont mess with them!
toelle (author) says: May 10, 2010. 5:10 AM
I don't think that would work. Without the IR-filter, all wavelenghts would be detected. It could maybe work if you were in a complete dark room, with a laserpointer.
thezapper602 says: Jul 13, 2009. 2:17 PM
This hack does not work in Israel nor on Israeli PC's. You can try, but GlovePie won't boot unless you hack it (witch is not easy, since it is not open source.)
toelle (author) says: Oct 29, 2009. 11:29 AM
Why not?
VRAndy says: Feb 5, 2010. 6:26 PM
The author of the software has intentionally crippled it so that it will not function in Israel as a sort of political protest.  He has claimed that he will release a patch when Israel gives equal rights to the Palestinians or when they pull out of the west bank and the Gaza strip.

I'm not at all sure that I approve of this method of protesting, but I guess it's his right.
ultimatesx9 says: Sep 20, 2008. 4:49 PM
IR only?.......... theres a problem, unless you took a web cam out of the case and put it on the missile launcher, and then made it aim at a moving object. yeah, not likly. this project is actully ironic, i wnet to maplins today, and saw the exact same ML, and was tempted to get it, but didnt have my money with me
kirgy9 says: Jun 18, 2009. 6:48 PM
actualy, the wiimote has a built-in IR camera. The "sensor bar" is quick ironic as all it does is light up IR LEDs the IR LEDs are used to help locate movement. If you dont believe me, powerup a wii, go to collaboration, find any old tv remote and point it at the wiimote whilst pressing buttons. On the screen you will see the LED lighting up on the TV remote. Its an odd system I know, but it works nonetheless.
ultimatesx9 says: Jun 19, 2009. 11:42 AM
No, i mean a webcam, you know, not IR-Cam. I know that a sensor bar is IR emitting light diodes inside. I mean using a webcam to track a moving objects motion and fire at that.
mr.incredible says: Dec 17, 2009. 6:48 PM
 The Wii remote is the IR web cam, NOT the IR emitter. You need a IR emitter for it to track. That is why you can make a White Board with the remote.
kirgy9 says: Jun 19, 2009. 3:20 PM
oh right, I thought the guy was geting at the idea of using it to target an IR LED, rather than actualy using a webcam? Cus it wouldnt be too difficult if he was doing that
Chowmix12 says: Mar 26, 2010. 7:37 AM
 can't you use lasers to point at the target? laser pointers have these infrared warning labels so the should work right?
watermelonhead says: Aug 21, 2009. 6:50 AM
umm...you duck-taped the wiimote to the turret?
toelle (author) says: Oct 29, 2009. 11:29 AM
That's right! All hail duct-tape!
watermelonhead says: Oct 29, 2009. 2:42 PM
JAAA
it just seems
um
crude?
but you're right. duct tape is awesome.

Yop.
DELETED_Joe141 says: Oct 29, 2009. 1:41 AM
(removed by author or community request)
toelle (author) says: Oct 29, 2009. 11:28 AM
You could try to change the code in glovePIE so it moves the mouse over a button and presses the mouse button.
d2j5 says: Oct 16, 2009. 6:34 PM
what does the missel launcher do on its own? and where can i even buy one?[ i know it shoots missles]
Colonel88 says: Aug 22, 2009. 2:04 PM
why don't you stick a coin cell and an IR led on the back of a nerf dart? Then you just shoot someone and watch them get obliterated by multiple other nerf darts :D
Gamernotnerd says: Sep 12, 2009. 4:11 PM
Or a low-power IR laser.
conradev says: Apr 3, 2009. 4:01 AM
ADD THIS TO THE THINK GEEK HACKS CONTEST BCAUSE YOU CAN FIND THIS MISSILE LAUNCHER ON THINK GEEK.COM
venomireland says: Apr 13, 2009. 9:45 AM
Caps lock?
junits15 says: Oct 19, 2008. 11:49 AM
wouldent it be cool if you took the ir laser out of a cd drive and put it into a pen hen all youd have to do would be to point it at the target person!
luke says: Dec 27, 2008. 5:51 AM
that should work but playing with IR lasers in very dangerous, they will fry your retina over easy without you seeing anything at all.
Inmate1440 says: Feb 23, 2009. 5:56 PM
or ever again for that matter
1-40 of 183Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!