3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Hack your usb missile launcher into an "Auto-aiming autoturret!"

Step 4Programming part1

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.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
1
Followers
2
Author:toelle