Tuesday, May 26, 2015

Blink, PowerShell, and Push-Ups

I have been at my new gig for a little over a month now. Some fellas at the new gig like to do push-ups throughout the day in an attempt to stay active during a primarily sedentary job. Me being a data guy and a fella that likes to try and stay active this activity falls right in my wheelhouse.

The first few weeks I did pretty good remembeing to stop and do push-ups throughout the day, however soon I kept forgetting. I would get to the end of the day and only have like 20 or 40 pushups. I recently brought the Blink(1) to work to keep an eye on traffic, news and stuff so I said "Self!" why not write a quick script to remind you to do pushups every hour.

Blink(1) makes this so simple. All you have to do is write a HEX color to a text file periodically. You then setup a rule in the blink control software to monitor the file. When the modified date on the file changes the blink(1) will show whatever color or pattern you send it.

I wrote a quick PowerShell script to write to the file.

So we loop 8 times and sleep for 3600 seconds each time (1 hour) giving us an all day pushup reminder script. I setup the Blink control software to scan the file every 5 minutes.

I also setup a Google Spreadsheet so I could track my push-up progress. I will make a chart with my progress (if it shows improvement ha) over the next few weeks.


Post a Comment