LED on when certain windows processes are running.

I am working on a Control Panel/Button Box for my Windows PC. However, I am hitting a snag when trying to figure out how to turn on an LED if a certain process/program/app is running on my PC. For instance, if Microsoft Word is running, I would like an LED to turn on to notify me of this. That LED is only for MS Word, and no other programs. I have about 10 applications that I would like to monitor and have LED's turn on if the app/program is active.

I have also hit a bit of a snag on the push buttons launching and also closing an application but think I may have that handled with Autohotkey. For now, I would like to keep this thread on the path of Controlling LED's if an application is on.

Thanks for your help in advance.



Interesting, thanks for the quick reply. I neglected to post how I was gathering the Windows Processes, my apologies. Currently I am extracting the info with this PowerShell Script:

$i = 1
while ($i -ge 1) {
get-process | Export-Csv C:\users\user\desktop\test.csv
sleep 5

It works, but am getting a csv with a whole bunch more info than I need. I am working on refining the information populated to just the programs I need. I am just not sure on how the information needs to be formatted that is going to be sent via the Serial Port.

If your Operating System is writing data to a CSV file on your PC then I suggest you write a separate program to read that file and parse it for relevant information and then send suitable messages to the Arduino.

For receiving data on the Arduino have a look at Serial Input Basics and get your PC program to format the data to match one of the examples. The technique in the 3rd one will be most reliable. If this was my project I would have the PC send data for all 10 LEDs every time - some will be off and some will be on.


Thanks for the assistance! I will review the linked info and tinker around a bit. I will let you know what I come up with. Thanks!

Okay, have done a bit more research around PowerShell to Arduino. Once I started down this path, it was much easier to understand. Found a few blog articles about this and they can be found here:

Anywho, working on finalizing the code and linking the libraries together. I have some place holders for IO Commands, create the shell loop command, and package it up. For anyone wanting to know how I am finding specific processes, here is the code for PowerShell:

#Check to see if Microsoft Word is running, then issue command.
$WordCheck = Get-Process winword -ErrorAction silentlycontinue
if ($WordCheck)
"LED 10 high" #Replace with the actual command to turn on LED
else {
"LED 10 low" #Replace with the actual command to turn off LED

#Check to see if Microsoft Outlook is running, then issue command.
$OutlookCheck = Get-Process outlook -ErrorAction silentlycontinue
if ($outlookCheck)
"LED 11 High" #Replace with the actual command to turn on LED
else {
"LED 11 Low" #Replace with the actual command to turn off LED

It is imperative that you find the actual process name for the process. For instance, if i replace "winword" with just "word", it will not find the running process.