This chapter does not appear in the book.
Protect your cubicle with a lethal defensive shield, deterring foolish intruders by firing missiles at them as they approach. In order to save money, I won't be using state-of-the-art tech., such as the SS-27 Sickle B ballistic system, but the somewhat cheaper Dream Cheeky launcher. This extremely dangerous weapon is sometimes disparaged as a mere toy, perhaps because it is. But those naysayers don't realize that I'm combining the launcher's awesome capabilities with the motion detection code from chapter VBI-4.
When movement is detected, the launcher automatically rotates left, right, up or down to point at the target. If the motion continues, then the launcher fires one of its missiles. This stupendous weapon system is illustrated in the picture at the top of this page, attacking its lowly creator.
The main topic of this chapter is how to write the launcher's control software, which operates via USB. The tricky part is that the Dream Cheeky gadget doesn't come with a developers API or any technical documentation, and so I'll use USB monitoring software, and some detective work, to develop one myself. The other problem is that Java doesn't support USB I/O as standard, so I need to utilize third-party libraries.
The good news is that much of this work can be applied to developing interfaces for other 'fun' USB devices, which typically use the same kinds of control and interrupt messaging.