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!

What do I need?

You need:

1 wiimote:
a bluetooth enabled pc
1 Usb missile launcher (duh!)
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:


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:


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 {

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.

<p>hey this would be really funny to get a super long usb cord and place it on top of the VCR so next time some1 uses the TV remote they get shot XD</p>
you mean to combine the three scripts right?
Where can i get a launcher like this besides ebay?
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??
This would be cool if you put an ir led on a rc helicopter and try to outfly the launcher<br>
Just a thought but maybe you should take this down as people may use this for criminal reasons (aka strapping it to a real gun, etc)
It can only aim at things that emit infrared light, so unless a criminal goes around taping infrared LEDs to people they cant use it for any illegal purpose. They would also have to carry around a laptop doing all the controlling, and create some sort of device to hold a real gun that can communicate back and forth between the computer. The possibility of a criminal doing all that is very low.
Unless I'm being dumb, the target doesn't need to emit IR, it could <strong>reflect</strong> IR. Just like laser guided bombs or missiles work. The LGB or LGM steers toward the <strong>basket</strong> which is the cone of reflected laser light which is aimed at the target by the aircraft or special forces target designator. Of course with laser designation, the laser has to be encoded (presumably not too different from IR used in a TV remote control), so that the bomb or missile doesn't or shouldn't look for the sun or a reflection of it, or any other strong IR sources. My old TV used to be confused by the IR emanating from a compact fluorescent light bulb, the new TV doesn't (old TV didn't use encoded commands and was designed before CFLs, new one does and is unaffected by CFLs). So an IR laser or collimated IR beam would do the trick. But the comms link could defeat many criminals.<br/><br/>It's amazing what you can learn from TV!<br/><br/>If a criminal is smart enough to crack the computer / gun comms link, then they wouldn't bother with this! They'd be into bot nets and DDOS attacks and big time extortion to get rich. No-one with any sense is going to use this to control a firearm to commit a crime. Firearms are too heavy and recoil. It would need to be thoroughly re-engineered. It's far simpler to pay someone to do the dirty deed.<br/><br/>All that hoopla aside - great Instructable!<br/>
If you want to be really old school with tv remotes you need to forget about IR completely! We have a TV that uses ultrasonics in the remote to communicate with the TV.
zenith right? no batteries. just the sound made from the metal inside the remote being hit. Still would've been great today no betteries needed.
Nope afraid not! It was some old B&O tv, the batteries it uses are near enough impossible to find now.
what kind of battery?
oh well zenith made one that just used the high pitched click of the metal. it was featured on hacknmod.com contest guess the thing.
any idea why this became obsolete? (other than the likelyness that it could change the channel if you drop the remote and it would interfere withe other peoples tvs)
just the fact that newer technologies produce ultrasonic sounds that would interfere with the television. Like do you hear the high pitched whines and sounds when you turn your tv on. would interfere. lol it would be a cool experiment to do.
Yeah it does sound cool, but I guess it was impractical to make (PCBs can be made for next to nothing, where as this sounds quite complicated to make), plus I guess it will wear out eventually.
Great. now some criminal's gonna set that up on the side of a highway and kill anyone in a silver car...
IR led throwies!
i had the same kind of idea. just make a bunch and give them to people or throw them at them. they will likely not know what it is, they will probably look at it for long enough for the missile launcher to find them! mwahaha
Hahahahahaha nice
oh, a thought popped into my head.. oh yeh, what about termal imaging cameras they work on infrared light emmited from the body.
Yeah that's what I was thinking.
Nobody emits infrared lol. Thermal cameras display thermal energy that is emitted from heat, ie: the heat your body gives off.
thermal energy is emitted in the Infrared wavelengh, think of it as very very red light that you cant see.
That's FAR infrared though, it's at a much longer wavelength than the NEAR infrared that standard sensors pick up.
No I'm thinking of a criminal at their house waiting for the police to show up.
Still, the police would need IR LEDs on them, the wiimote can only see relatively intense IR. Also, the IR LEDs have to be pointed within a certain angle dependent upon the LEDs for the wiimote to see the IR. You wouldn't be able to just put a single IR LED on someone and expect for it to work, LEDs dont emit the same intensity light 360 degrees in a sphere, they have certain angles where the light is more or less intense at. That's why trying to play your wii from the side doesn't work well, the wiimote can't see well without pretty much a straight on view.
firstly I can't see many reasons why someone would choose to trust their attempts of murder to a wiimote its just silly. However not as silly as adamvan2000's claims that paper is fun.
seriously, who ever heard of a "usb gun" anyway?
Wow.... That's just like saying one shouldn't use paper because it might be used to write plans for an atom bomb, or something. It's a fun, harmless toy. If someone has the know-how(and desire) to link this to some sort of weaponry, then chances are this instructable being here or not being here would not be a factor. They'd still find a way to do it regardless. Just like a knife, it can be used for cutting steaks or cutting off body parts. It's the intent of the user. That said, excellent 'ible. I really love the (unique)marriage of two commercial tech products. All you need is a sighting laser to make it extra freaky. I can imagine someone seeing the laser tracking an IR emitting source and freaking. ~adamvan2000
seriously if someone is demented enough to do that they're gonna do it if there's an Instructable or not. it'd be fun to put some IR lights on a toy car... drive it around, try not to get hit good Instructable
That is one of the dumbest requests ive ever heard.
I don't think they could do that really. This is a USB controlled device and most people who have a gun could do this anyways.
will this work with the think geek one?
This one? http://www.thinkgeek.com/geektoys/warfare/8a0f/<br><br>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.
what one did you use?
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?
you could always do the easy thing and get this<br /> <a href="http://www.thinkgeek.com/geektoys/warfare/8bc4/" rel="nofollow">http://www.thinkgeek.com/geektoys/warfare/8bc4/</a>
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.<br />
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...&nbsp;
<p>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.</p>
then, whats with the big red &quot;infrared radiation&quot;&nbsp;warning labels? has anyone given it a try?<br />
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)<br />
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..<br />
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&nbsp;pretty dangerous! Dont mess with them!<br />
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.<br />
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
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.

About This Instructable




More by toelle:Fix broken temperature sensors in your PC case Hack your usb missile launcher into an "Auto-aiming autoturret!" 
Add instructable to: