Skip to content

danishcake/missilelauncher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

===================
= MissileLauncher =
==================

A hotspot tracking missile launcher control program using a Wiimote for hotspot
detection by Edward Woolhouse.

Licensed under the GPL v3, inherited from wiiuse. See LICENSE for 
the usual details.




This is a little project that uses a USB missile launcher (of the type sold 
at Play.com) and a Wiimote to give you a hotspot tracking missile launcher. 
You can also control it with the wiimote dpad.

Controls:
dpad: change angle
A:    switch to IR hotspot tracking
B:    FIRE!
+-:   Increase/decrease IR sensitivity


Building:
You will need boost, libusb, bluez, libbluetooth-dev and cmake installed. 

Assuming you are running Raspbian this should be relatively simple. You can 
just use the standard debian method to install the dependancies

From memory I think the commands are:

sudo apt-get install cmake libusb-1.0-0-dev libboost1.50-all-dev bluez libbluetooth-dev

Now you need to install wiiuse, the library used to interface with the 
Wiimote. This is not in the standard repositories, so we can't just apt-get it.
Instead the source can be downloaded and built.

Navigate to the wiiuse folder, download it, build it and install it

git clone https://github.com/rpavlik/wiiuse.git
mkdir build
cd build
cmake ..
make
sudo make install

Now we need to build the missile launcher. This is also built with cmake,
so the routine is very similar. Go to the project root

cd ..
mkdir build
cmake ..
make

Now we can run it
cd missilelauncher
sudo ./missilelauncher


You need root to run it as we detach a kernel driver from the USB missile 
launcher in order to take control ourselves.

Voila, missile launcher. Have fun. Do fun stuff with it. 
Make it better (and remember to publish your changes!)
Email me for help - danishcake@hotmail.com

Extensions: 

Add proper hotspot correlation - correlate the hotspot input each frame
with the previous and build a 'track'. This should help prevent the tracking
code from 'wandering off'.

Add automatic search behaviour when in hotspot tracking mode but not seeing any
hotspots - scan left/right and up/down to find a hotspot to lock onto.

Add a GUI - text mode would be awesome. ncurses?

Wrap the tracking library in python. See libmissile/Python.cpp for example on how.

About

Raspberrypi missile launcher

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published