TrayServiceControl

I’ve made a little tool to help me when I’m developing Windows Services. It’s an icon that sits in the Notification area/System tray and allows you to start, stop and debug services. I find Services.msc a bit of a pain; it has a really long list of services making the one you’re interested in hard to find. This tool allows you to filter down to what you’re interested in. Debugging services can also beĀ inconvenient; the executable names can be the same (for example, svchost.exe is listed thirteen times in my system) making it difficult to find which one you’re looking for.

The code and executable are available on Google Code.

Advertisements

Using LED command line without root

A few of the people who tried to build the LED cube had problems getting it to run. Several people didn’t realise that you needed root. I’ve now had to solve this problem for my self as I’m now trying to use it from my ubuntu plug. I found the solution here and have adapted it for the cube. The solution to this is too use udev, which allows devices to be run from user space.

Create new rule for udev

sudo emacs /etc/udev/rules.d/60-objdev.rules

Edit new rule in emacs and add following:

SUBSYSTEM!=”usb_device”, ACTION!=”add”, GOTO=”objdev_rules_end”

SYSFS{idVendor}==”16c0″, SYSFS{idProduct}==”05df”, GROUP=”users”, MODE=”666″
LABEL=”objdev_rules_end”

For other devices replace the vendor and product id with values you can get from lsusb. For example:

daveh@mbp:~$ lsusb

Bus 001 Device 005: ID 16c0:05df VOTI

Restart udev

sudo /etc/init.d/udev restart

Plug in the cube, and try the command.

Cube Hack part II (software)

I’ve created a Google code project with the snappy title of avr-usb-rgb-led. It is based on the hid-custom-rq example from AVR usb examples. I’ve added 3 new commands, one for each LED. It uses a software PWM to control the brightness of each LED based on the value set.

There is a coresponding program using libusb which allows you to send the commands, it simply allows you to set the colour of the cube with an RGB tuple on the command line.

To get the code you need to check out using subversion. To flash the chip you probably want to use the makefile.