C# -> Serial Arduino, showing cpu load with led

My new project, is a simple led-strip which shows CPU load. 9
led's are used for this, could have used more but my tiny
breadboard couldn't hold more. Anyhow, it uses serial
communication to receive how much the totalcpu usage is.
For this I use a C# program I wrote, it just sends a values
from 0-100. And the Arduino reacts and
lights up leds accordingly to how much load your CPU got.

Also wrote a tutorial on this, if anyone's interested: Stigern.Net » Blog Archive Arduino: Showing CPU load with 9 leds! - Stigern.Net

In your sketch, the range from b>20 to b<25 causes nothing to happen. Same for 30 to 35. Other than that, it's pretty neat.

Ah, yes was a littlebit fast there :stuck_out_tongue: Thanks.

I may be missing something (can't get your circuit diagram to load at the moment) but you should have some resistors on those LEDs.

http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

I have run clear 5mm LED's on the Arduino directly fine, the current the Arduino can supply is only just pushing the limits of those LED's. However for the regular red LED's I would recommend resistors.

This file has been downloaded 10 times

Is that all? This looks like a brilliant little program. I am going to do some rather different things with it but it looks very useful.
I am also going to have a look and see what other data can be extracted from the PC and sent via serial. I presume that memory usage, hard drive capacity and all that stuff could be grabbed...

Great project,

Mowcius

Yes, a lot information can be sent to the arduino. I'm gonna experiment more with it when my Serial LCD arrives.

I'm gonna experiment more with it when my Serial LCD arrives.

I am just about to have a look through the program and see what else I can port to my arduino. I have a 20x4 Serial LCD but the backlight has gone :frowning: still readable though...

Mowcius

Im curious what operating systems this will work with. Does it work with 32bit and 64bit systems, Single core, dual core and quad core processors. I guess im just not too familiar with how this information would be extracted from a computer.

Some insight would be really appreciated.

Like the project.

Chris

I'm completely new to Arduino but I had no idea that you could interface with the board using C#! That's huge for Windows developers.

Thanks for posting the tutorial and code. :sunglasses:

Looking at the program you are using on the PC I would say you are updating it way more often than is actually required. It will sap CPU cycles from your machine. I would recommend adding a longer delay to the loop on the PC and making the program tray-minimizable.

Other than that a very tidy, neat little project. Keep up the good work.

I am just about to have a look through the program and see what else I can port to my arduino. I have a 20x4 Serial LCD but the backlight has gone Sad still readable though...

Mowcius

should be easy enough to replace the backlight just bend up the metal casing at that end, or carefully remove itallong wit the screen (if ure brave XD ) and see if u can take out the existing backlight or drill holes in it for a couple of new LEDs, the 2x16 backlight looks easier to replace the LEDs tho because its exposed.

I have run clear 5mm LED's on the Arduino directly fine, the current the Arduino can supply is only just pushing the limits of those LED's. However for the regular red LED's I would recommend resistors.

Then either you've been lucky or you got LEDs wit embedded resistor by accident...
You should really not connect an LED to an Arduino-pin without any resistor. It's not as you may think, that (

the current the Arduino can supply is only just pushing the limits of those LED's

.
A pin's maximum current should be 40mA or you risk damaging it. The ATMega is not cutting off current as soon as it reaches 40mA (that's what I think you believe from what you've written). Indeed the current through the pin can be much higher, as the constellation Pin-LED-Ground is actually almost the same as a short circuit. Limiting the current by using a resistor is your task, not the ATMega's.

So you should really read through Grumpy Mike's tutorial, it's a nice one (and read the other ones as well while you're there, very well written stuff).

Hi there, do you have the source code to outputting the CPU load to the serial port? Thanks!