USB rotary channel changer: Software

Software implementation

You can receive a signal from the channel changer via a generic USB joypad driver. The device emits a "button-down" event and a "button-up" event simultaneously when the knob is rotated. The application should accept only "button-down" event and just ignore the "button-up" event.

Because the most of USB joypad and the generic driver emits an event when any button is pressed, there is no way to know which channel is set when the application is launched.

Examples

Here I introduce some example applications of the channel changer. All of them are for Linux operating system.

TV (software) channel changer

These applications allow you to change the channel of 2 Linux TV applications, xawtv and tvtime with the USB rotary channel changer. Both program just call remote commands for those softwares. It would be better to use a scripting language like Perl or Python, but I wrote them in C.

[tvtime]

switching between channels on tvtime

Please just compile them and you'll get some executable binaries. At first connect the channel changer, launch the TV software and *-gacha. When you give an alias "v4l-gacha" to xawtv-gacha, it call v4lctl instead of xawtv-remote and you can control the other TV applications.

Virtual desktop switcher

Have you ever been bored to switch your virtual desktop by clicking icons or pressing Alt-Ctrl-Shift-* combination? Here is an entirely new way to switch the desktop. As if it is an old TV, you can switch the desktop by rotating the knob. The current model can select up to 12 desktops.

The following samples are for FVWM's virtual desktop extension (FvwmPager). At first, create 12 virtual desktop horizontally (type FvwmCommand "DeskTopSize 12x1"), then start fvwmswitch. Using two channel changers with fvwmswitch2 allow you two dimensional positioning and you can switch among 12x12 virtual desktops!

[Desktop 1]

My boss is coming!

[Desktop 2]

Phew.

Oscillator control

This sample makes the channel changer a musical instrument. The following picture is a patch of Pure Data. You can change the frequency of the oscillator by rotating the knob. The joystick module for Pd can be found at Joseph Sarlo's page.

[Oscillator sample]

Conclusion

The USB rotary channel changer which consists of existing commodity components, and some applications also from existing software were introduced. Rotating a knob with clicky noise and controlling the PC is funny and fresh experiment. If you want some new input devices, you should try this cheap gadget.