Hi, I’m Lex (they/them), I make silly projects.
This one is a physical CPU usage display. Kinda like the CPU usage display in task manager, but with a physical analog meter for each CPU.
It also does memory usage!
Enjoy!
FAQ:
Q: How do you get the performance numbers from the computer to the arduino
A: I wrote a Rust program that uses the systemstat crate to get the data from linux, it then does a little bit of maths to transform the data, and sends that to the ardunio over USB-serial
Q: What’s the music?
A: Just some random thing I threw together in a midi editor, I’m not very experienced with music production.
Q: Does this slow down the computer?
A: Not significantly. Yes, it does take a little bit of CPU time to calculate the numbers, transform them, and send them out the serial port, but as you can see from the meters, the CPUs are often almost totally idle, so it’s not a burden on the computer at all.
Q: Is the code available? A parts list? A wiring diagram?
A: Not really, but I can explain what you need: The wiring is very simple, you can follow an arduino tutorial for wiring up LEDs, and the meters just need to be connected up to PWM pins with the right resistor. The parts are just an arduino, some addressible LEDs, and any suitable ammeter. The software is designed specifically for my needs and I don’t intend to update it to work in the general case where the number of meters might be different to mine, so I’m not releasing the code. Sorry.
Q: Why is the swap meter so high all the time?
A: I’m not exactly sure, but it’s probably a side effect of the way that Linux manages swap space. There might be some other more useful measure that I could use instead. EDIT: okay, update, it hasn’t ever been that high since I filmed the video. I’ve been using it regularly and the swap mostly stays around 0 now, I don’t think I changed the code, so I guess this was an anomaly.
Q: Why not make the refresh rate higher? (related: Why not make it a rolling average instead of polling?)
A: TL;DR: this sample rate is the most sensible. Long answer: Okay, so the answer to this question could get really technical and go into the details of how the CPU usage is calculated by the OS. If you open Windows task manager, MacOS activity monitor, or your favourite linux system monitor utility, you’ll see that the refresh rate is about once per second by default. This is because higher sample rates actually produce less meaningful numbers. Suppose you were to sample at about 100hz. That means that even a really short computation that only takes one hundredth of a second to complete will show up as 100% cpu usage in that time, and then 0% for the rest, insead of being 1% in the past second. There is no such thing as an instantaneous CPU usage reading, becuase it’s either running or sleeping, there is no in between. Any CPU usage number that’s meaningful is an average of the run/sleep time over some period. You have to sample slowly to get meaningful numbers at all. This is also why a rolling average isn’t useful. It doesn’t really tell you more information. This display does, in fact, interpolate between readings. This is why the needles slowly move to the next value instead of jumping there immediately (and then wobbling around a bit as they settle at the new reading). This is effectively the same thing you’d see if it was possible to get a rolling average from the OS. (well not quite, but close enough.) I don’t think any OS does provide an API for a rolling average like that, since doing so would require a significant computational overhead that doesn’t provide any meaningful benefit.
3 views
145
30
2 months ago 00:01:12 1
ONE PIECE: Season 2 | Inside Look | Netflix
2 months ago 00:15:55 1
ЦЕЛЬ - ВЕДИЧЕСКАЯ ВЕРА - ВЕДАЮ Значит ЗНАЮ
2 months ago 00:11:00 1
Freddy’s Unlocked | Custom Night 4/20 Mode COMPLETED | Roblox FNaF Fan Game | Read Description
2 months ago 00:28:29 1
ДОРОГА В ОСЕНЬ |Гуашь и ватные палочки✌
2 months ago 00:30:15 1
(Иуд. 1:12-25) Лекция 2. Соборное Послание Апостола Иуды. Лекции по Новому Завету.
2 months ago 00:01:04 1
Baby Panda Meets Mom For First Time
2 months ago 00:06:26 1
SYBREED - System Debaser (Official Lyric Video)
2 months ago 01:33:20 1
Reinhardt Buhr - The Space Between (2021 Full Album) - Ambient Ableton Live Looping
2 months ago 00:04:36 1
Данечка собирается в Африку / Daniela goes to Africa
2 months ago 00:04:41 1
Sri Mahalakshmi Ashtakam | महालक्ष्मी अष्टकम | Powerful Lakshmi Mantra
2 months ago 00:22:15 1
🧪🧪🧪🧪Прорыв в технологии Варп-двигателя.
2 months ago 00:10:31 1
Basic Handgun Calibers Explained - Semi-Automatic Ammo Breakdown
2 months ago 00:05:00 1
Heilung | Anoana [Official Video]
2 months ago 00:59:19 1
Heilung - Drif (full album) 2022
2 months ago 01:41:50 3
Ashish Sharma: ’I was replaced last minute in an Aishwarya Rai Akshay Kumar movie by ...!’
2 months ago 00:05:20 1
ПРЕПОДОБНЫЕ СЕРГИЙ И ГЕРМАН ВАЛААМСКИЕ ⧸ СВЯТОЙ ДНЯ
2 months ago 00:32:13 1
top most creative diy tractor science project | house construction
2 months ago 00:06:50 1
Zakir Akhtar Hussain ( moscow program)
2 months ago 00:04:15 1
My heart will go on⎪Loud 12 String Guitar Version
2 months ago 00:03:19 1
Till Brönner & Yello - Till Tomorrow (HD 1080p) *THE SMOOTHJAZZ LOFT*
2 months ago 00:16:35 1
WHY I LEFT GERMANY
2 months ago 00:07:44 1
Daniel Castro ~ I’ll Play The Blues For You
2 months ago 00:00:30 1
Iron Maiden Announce ’Run For Your Lives’ World Tour 2025/26
2 months ago 00:00:00 1
УЗБЕКИСТАН ПРОТИВ ИНДИИ!!! | США vs Венгрия, Китай vs Иран | Шахматная Олимпиада 2024 | Тур 9/11