Sign up ×
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

So i want to make arduino show my computer cpu usage with leds, for example if 10% then 1 led will light, if 50% then 5 leds, if 80% then 8 leds...

share|improve this question

migrated from electronics.stackexchange.com Jan 11 at 13:53

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

    
How you would do that depends completely on what OS you're using. – Majenko Jan 11 at 13:38

1 Answer 1

up vote 1 down vote accepted

There's three basic steps you need to cover:

  1. Get the CPU usage of your computer
  2. Communicate that to the Arduino
  3. Have the Arduino respond to the data

We can't really help you with step 1. That's outside our remit. You should head over to StackOverflow for that. How you would do it depends on your host OS since each one has its own way of reporting it.

For step 2 you would need to write software for your computer, incorporating what you have learned from step 1. Once you have the correct data you need to send it over to the Arduino through its serial connection. You'd need to come up with a good way of doing that, but probably just sending the usage percentage as plain ASCII text separated by new-lines is probably simplest.

Step 3 would entail reading in the data you sent in step 2, deciding what the numbers you have got mean, and then turning on the relevant LEDs.

Another option, which might simplify things a little, might be to use something like Firmata, where your PC sends the instructions to turn the LEDs on and off, and the Arduino just becomes a kind of dumb interface that doesn't do much on its own.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.