foosel/OctoPrint — pull request #494 by nekromant (2014-06-07 08:17:11+00:00)
Title: Implement printer control by WIImote 

This patch enables octoprint to allow you to control you 3d-printer by a wiimote. All you need is wiimote, a cheap usb-bluetooth dongle in your host pc, python-cwiid ( I guess, windows users are out of luck)

While now neither nunchuck, nor classic controller are supported - just basic functionality that allows you to bind any wiimote key to send any gcode to the printer, that comes in handy when you are messing with the mechanics/calibrating it.

I'm not a big python expert (actually, that's the biggest code in python I've ever written - mostly code linux kernel drivers for a living), so you might want to refactor it yourself/or give me a little advice how to better integrate it along with octoprint. This is just a very quick hack.

How to use:

* Add the following to your octoprint config:
```yaml
wii:
enabled: true
BTN_DOWN:
- G91
- G1 Y-5 F1000
BTN_HOME:
- G28 X0 Y0 Z0
BTN_RIGHT:
- G91
- G1 X5 F1000
BTN_LEFT:
- G91
- G1 X-5 F1000
BTN_UP:
- G91
- G1 Y5 F1000
BTN_PLUS:
- G91
- G1 Z5 F200
BTN_MINUS:
- G91
- G1 Z-5 F200
BTN_1:
- G91
- G1 E1 F300
BTN_2:
- G91
- G1 E-1 F300
BTN_A:
- M18
```
* Start octoprint
* Pree 1+2 on a wiimote
* Wait till the first led starts blinking once a second
* Use it.

When done you can turn wiimote off, and once needed just reconnect it by pressing 1+2 again.