Code Monkey home page Code Monkey logo

system-monitor-lamp's Introduction

System Monitor Lamp

A USB lamp that lights up according to the CPU, network and disk usages of the host.

The final result

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.

How it works

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.

Hardware

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.

Platform support

  • 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.

system-monitor-lamp's People

Contributors

jturcotte avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.