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...
migrated from electronics.stackexchange.com Jan 11 at 13:53This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts. |
|||||
|
There's three basic steps you need to cover:
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. |
|||
|