Visual Computer Stress Meter- Arduino

 by alecnotalex
Featured
Have you ever wanted to, without going out of your way to clock your processor, see how much stress your computer is under? With this project you will have a simple bar graph that constantly shows how much stress your computer is under. If the graph reads 0, your computer isn't working too much. If it reads 8, the highest, your computer is working very hard, and you probably should give it any more of a load. This tutorial is remotely easy, meaning a beginner should be able to follow it fairly well. After all, I am  beginner myself.

This tutorial is interned for Unix users. If I am correct, small tweaking should allow it to work on Windows. Maybe some day I'll re-write it for Windows users. 
 
Remove these adsRemove these ads by Signing Up

Step 1: How it works

You may be wondering how it works at this point, before you get started. All of the real work is done with a perl script.

1. A perl script clocks the processor.
2. The script uses that number to come up with a number from 1-9.
3. The script throws that number to the Arduino, using Serial connection.
4. The script get repeated over and over, for an infinite amount of time.
5. Each time the Arduino receives ten numbers, it averages them, and shows the average on the bar graph.

It's as easy as that!
EncasedDeath says: Feb 1, 2013. 8:01 PM
When I try to run the Perl code in Command Prompt I get this problem. Any Ideas?
C:\Users\Logan>C:\Users\Logan\Desktop\clock\loop.pl
Can't locate Unix/Processors.pm in @INC (@INC contains: C:/Perl64/site/lib C:/Pe
rl64/lib .) at C:\Users\Logan\Desktop\clock\loop.pl line 4.
BEGIN failed--compilation aborted at C:\Users\Logan\Desktop\clock\loop.pl line 4
.
alecnotalex (author) in reply to EncasedDeathFeb 2, 2013. 4:19 AM
Due to what your paths look like, I'll assume you're using Windows. The interpreter is having issues with the Unix:Processors module, because, well, Windows is not Unix, and it actually isn't very similar to Unix. After doing a bit of research, I found the Win32::SystemInfo::CpuUsage, so I would recommend looking that up.
yanney says: Apr 29, 2012. 2:22 PM
i run into a couple of problems. While trying to run loop.pl i get this "Expected end of line, etc. but found “while”."

while trying to run clockandsend.pl, i get this "Expected end of line, etc. but found identifier."

any help?
alecnotalex (author) in reply to yanneyMay 1, 2012. 3:51 AM
I don't really know...
What version of perl are you using?
wschmidt says: Apr 16, 2012. 12:22 PM
What version of Perl did you use, Strawberry or ActiveState?
alecnotalex (author) in reply to wschmidtApr 16, 2012. 1:28 PM
I run Linux, so I didn't need either, I could just use the standard.
janw says: Apr 7, 2012. 1:25 PM
Nice little project! Maybe you should use 10 leds. Then every led is 10% processor load.
alecnotalex (author) in reply to janwApr 7, 2012. 1:36 PM
Yes, I was considering doing that. I actually don't know why I chose 8 instead...
If I have some free time I'll probably update it for ten LEDs, but as for now, I have other projects that I'm working on.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!