A USB lamp that lights up according to the CPU, network and disk usages of the host.
Each metric is displayed as one color channel; green for CPU, blue for network and red for disk. The LEDs on the ring are split according to the number of CPU cores for the green channel. For disk and network the ring is split in two, left for input and right for output.
The Teensy firmware has support for Raw HID, which can be used to send arbitrary data from the host to the device where it can be interpretted as we wish to operate digital or analog pins.
This project contains both code for the lamp and a service to run on the host computer. The host collects system monitoring metrics every 2 seconds and sends them over USB to the lamp by encoding the luminosity of each color channel. The lamp then interpolates received values with the previous ones and animates the transition over the next 2 seconds.
The lamp's code is in C++ and the host's service code is in Rust.
- Tennsy 2.0
- NovelKeys Big Switch
- NeoPixel Ring 24x or 12x
- A 3D-printed case (I got mine printed through http://3dhubs.com/)
Connect the Big Switch to GND and pin 0 and the NeoPixel's Data Input to pin 23 (along with PWR and GND to their respective pin) on the Teensy 2.0. This can also be changed by editing lamp.ino.
- The host system monitor service currently only fully works on Linux.
- CPU reporting is working on macOS without network and disk. The host sometimes has difficulties communicating with the lamp for some reason that I didn't investigate.
- Windows support isn't implemented.
I used Teensyduino 1.44 for the USB lamp.