Sunday, November 20, 2016

Christmas Tree 2016

I had needed an excuse for a while to by the Raspberry Pi, and I had wanted to do the Christmas light thing for a while so I finally pulled the trigger this year. I purchased a Raspberry Pi 3 and 8 channel solid state relay and some outlets.

The software is open source and is awesome: LightShowPi. The software is so easy to use, right out of the box. Once you get the Pi up and going its cake.

The toughest part of the whole project was wiring up the 8 outlets but even that was pretty simple. Once you get them wired up its just a matter of getting everything hooked up to the Raspberry Pi correctly.

I know I am abstracting a lot of steps here and not really showing a thorough guide here, I will try to post a step by step in the future. Here are some pictures and videos of the finished project.

Wednesday, October 19, 2016

ESP8266 Gmail Send Email

Found this sweet Instructable detailing how to cook up a Gmail Sender using the ESP8266. So I hooked it up with a temperature sensor and started testing sending notifications based on various temperatures.

Create a new Gmail Account

I created a new account because you have to enable less secure apps access on Gmail.
  1. Create your account and then go to Gmail. 
  2. Go to 
  3. You should land on the settings for your new google account. 
  4. Click the Signing into Google Link
  5. Enable the Allow Less Secure Apps option at the bottom of the page.
  6. You google account should be all set

Update the Code

I had some trouble connecting the ESP to the Arduinio IDE at first. I followed several different tutorials online. There are some good detailed tutorials about how to add the board to the IDE and such. I think the final fix was a full reboot of my Desktop. It just magically started working. Perhaps I can cover that in a future blog post, but for now I am just going to assume you have your ESP working with the Arduino IDE.

  1. Go snag the original ZIP file from the Instructable link above or go here to snag a copy of the zip file.
  2. Open the Gsender.h in the Arduino IDE
  3. Near the top of the file you need to provide your new Gmail Login and Password in BASE64 format. Go to this website: and paste your login to convert it to BASE64 and then convert your password to BASE64
  4. Change the FROM address to your new Gmail address
  5. Save this file
So this project will read the temperature from a temperature sensor and then will send an email if the temperature is within a specific threshold. I modified the code on the original Instructable page to enable it to read the sensor and send the email. You may want to work with the original code from the Instructable before moving on. This will ensure the core functionality (wifi connecting and email sending) is working before moving on to sensor reading.
  1. Open the ESP8266_Gmail_Sender file in the Arduino IDE
  2. I have pasted my Sender file below. This file will connect to your WiFi and then will read a temperature sensor every 30 seconds. If the temperature falls within a defined threshold it will send an email.
  3. Save this file
  4. Compile and upload the sketch

Output and Email

If all goes well the sketch will upload and compile. You will start seeing temperature readings in the Serial Monitor output. You will also see a connection to Gmail if the temperature falls within your defined range.

Wednesday, August 17, 2016

GPX Heat Maps

I have been running a lot this year. I am currently training for the Kansas City Full Marathon. I was looking for a way to Heat Map my runs and I stumbled on the solution today.

Here is a sample Heat Map of my Downtown runs.

First you will need to get your files. I use the RunKeeper app to track my runs. RunKeeper allows you to download your run files in GPX format. The website I used to build the Heat Map allows you to use GPX and other files.

  1. Download your RunKeeper GPX files, or grab your files you want to import.
  2. Go to
  3. Click Create a Map
  4. Click the Upload data, up arrow on the right side of the screen
  5. Browse to your GPX files, or whatever format you used.
  6. Click the map settings button, little gear on the right
  7. Click Default Properties
  8. Change the opacity to .4
  9. Change the weight to 5
  10. Click the Tile Layers button (little stack of paper)
  11. Choose the background you want to use.

Tuesday, August 16, 2016

ESP8266 GPIO Read

A while back I ordered two LoLin ESP8266 modules from eBay for super cheap. Off and on I was messing around with them trying to get them to work...with not much luck. I wasted a lot of time trying to get the ESP8266s to work with the Arduino IDE for some reason.

I finally wised up and pitched the Arduino IDE idea and started using the LuaLoader. The interface is a little cludgy and old looking but man this thing app works great.

Initial Setup

  1. Download and install the LuaLoader.
  2. Fire up LuaLoader.exe
  3. Plug in your ESP8266
  4. Click the settings menu in LuaLoader. You should see Open COMX on the setup menu. The LuaLoader automatically knows which COM port you are using.
  5. You should see a Connected Response and the COM section on the Top right should be green.
  6. In the Orange section you will see a spot for your wifi details...plug in  your WIFI information
  7. Click the Get IP button
  8. BOOM, you have an IP.

Lua Script

You are now ready to start your quest to learn the .lua language. Below is a sample script. This script will start up a web server on the ESP8266 and will present some HTML. The web page will allow you to interact with an LED. Each 10s button will increase the intensity of the LED. If you click OFF it will turn the LED OFF, if you click ON it will turn the LED on 100%. If you click BLINK it will blink the LED on and off.

You will also notice that we read the GPIO Pin to determine if the LED is on or off. This will come in handy as we start to incorporate some other sensors. We can start adding Relays, Temperature sensors, Motion detectors, etc.

  1. Connect an LED to a Ground Pin and the D1 Pin on your ESP8266
  2. Open your favorite text editor
  3. Paste this code into your text editor
  4. Modify the code as needed. You will notice I am using port 85, you can use whatever port you want. Also I am loading an image from my web server. You can change that to whatever you want as well.
  5. Save your script with the name init.lua.
  6. Open up the LuaLoader interface again
  7. Click the Upload File Button on the right side
  8. Browse to your init.lua file and click open
  9. LuaLoader will upload your file.
  10. Once the upload is complete click Dofile. 
  11. Hit the IP address with the Port you specified in a web browser. 
  12. You should be able to control your LED using the web page.

So if you call the lua file init.lua, the ESP8266 will load this file on boot. This is cool because now you can find an external power source (I've been using a spare ChromeCast power brick, anything 3.3V to 5V should work) and the ESP8266 will load your program on boot. Meaning you can plug this thing in anywhere it can hit WiFi and you can start interacting with it via the web.

Tuesday, June 7, 2016

Super Mega Baseball 2016 Sirloins Game 3

It is safe to say I now realize how much work this is. 30 something regular season games...sheesh what was I thinking. Oh well. I have played I think up to game 6 here is the Game 3 review.

Game 3 features a clash against the Moose. The Moose sent out their ace hurler Horstman. Horstman shutem down in the fist at what looked like a long day for the Sirloins batters.

Things changed quickly in the second when this happened.

  • Hammer steps in Bottom of the second singles to left
  • Royal follows up and crushes a 470 blast to dead center
  • Benny hits a towering shot off the top of the center field wall for a long single
  • Jake Pounders is the next batter...415 bomb to left center, no doubts.
  • Glovey hits a rope to center
  • Green Gras hits another blast off the top of the wall and checks in with an RBI Triple
  • Jack Longballo singles in Gras
  • Hammer coming up for second time and the Moose finally stop the bleeding down 6-0

Things get uglier in the Bottom of the 4th for Horstman as a string of hits adds another 3 runs to the score. The Sirloins have a commanding 9-0 lead.

The Sirloins tack on another in the bottom of 5th to go up 10-1. At this point Sirloins ace Blaze is crusing having only given up 1 run.

Bottom of 6th another big inning for the Sirloins

  • Jack smokes a laser shot to left 387ft with Green Gras aboard. 2run blast
  • Hammer follows with a single
  • Jake Poundes just misses a 2 run shot for out 3

The final nail in the coffin for Horstman's day was in the bottom of 7 after Blaze steps up. Blaze jacks a 375ft solo shot to left finally chasing Horstman from the game.

Vaughn comes in to close it down. Final 13-3.

Wednesday, June 1, 2016

Desk Workout Script Take 3

So the Toast Notifications did not work as I wanted. The notification would appear then disappear real quick sometimes and I would not even see the notification.

So I went back to make a large window show up every hour approach. I found a link on how to make custom forms in PowerShell and started tweaking it.

So every hour the script is running I am greeted with that amazing PowerShell Form. Here is the code:

My buddy Doug Challenged me to do some Overhead Bulgarian Squats so that is the exercise of the day. It is going to be a rough day.

Monday, May 23, 2016

Sizzlin Sirloins Game 2: Sirloins power past Herbisaurs for Win 2

After a close game 1 victory the Sirloins kept their winning ways in a matchup against the Herbisaurs in Game 2 of the 2016 season.

Casey Royal got the 2nd inning run explosion started with a leadoff double. Benny Rodriguez followed up with a single to right. In stepped Jake Pounders who pounded a 3-run 426 Foot blast to right field. Hole Camels bloops a single into right followed by a Willy Mays Hayes single.

Green Gras hits a double to right to make the score 4-0.

The Herbisaurs flashed some leather with a sweet 2 out snag at third by Henny Hampster.

Not to be outdown Hole Camels started a sweet double play in the bottom half of the second.  Camels showing his skill at the plate with a triple off the top of the wall in the 4th. Green Gras then hits a towering 2-Run 433 ft blast to center to make the score 6-0.

Hammer adds a RBI single in the 9th to increase the lead 8-2. Wild Thing Vaughn is called in to close it down. The Sirloins add another tick in the W column.

The 3 Stars of the Game

Sunday, May 22, 2016

Sizzlin Sirloins Game 1: Harry Butts tosses a gem

The Sizzling Sirloins are off to a hot start after their ace Harry Butts tosses an 8 inning 1 earned run gem to kick off the season with a 1 in the W column.

The Sirloins got on the board first in the bottom of the 2nd inning when Casey Royal leads off with a double. Followed by a Jake Pounders double to Center Field scoring Casey.

Opposing pitcher Jovita Pulo helped out his cause in the third scoring on a Casey Royal throwing error to tie the game. Harry Butts gets some help from his defense Green Gras knocks down a laser and makes the play. Hammer Longballo smokes a 436ft bomb to center to give the Sirloins the lead in the 6th frame.

Bottom of the 8th saw some more action as Hammer starts off the inning with a single. Casey Royal lines one off of Pulo and the runners are safe at first and second. Pulo may have been razzled a bit after taking the line drive from Royal because he throws a mistake to Benny Rodriguez and Benny makes him pay with a three run jack to center. 432ft titanic blast.

Wild Thing Vaughn comes in and gives up a few garbage runs but starts a double play to finish up the game.

The 3 starts of the game were Harry Butts, Benny Rodriguez and Hammer Longballo

Friday, May 20, 2016

Super Mega Baseball Season 1

Thought it would be fun to start a league on Super Mega Baseball and follow them like a beat reporter/sports reporting for a few weeks this summer. I will track the team's games and progress. I hope to have video highlights of games, player interviews, etc

I enlisted the help of some friends to name the team. I received several naming ideas and whittled them down to 18 players to fill the roster. It is my pleasure to prsent the 2016 Sizzlin Sirloins.


Jack Longballo1BPart 1 of the Longballo Bros. Jack no where near the athlete of his bro Hammer but he can mash
Green Gras2BWirey second basement called up from the Triple A team in Cheboygan. Usually nervous and squirrely
Benny RodriguezSSMeteoric rise from the Sandlot to the Sizzling Sirloins Starting Short Stop.
Jake Pounders3BCompetes with Hammer to see who can crush the ball the farthest. Hates Green M&Ms
Casey RoyalLFAll American kid from Clarksville, TN. Country Strong can go deep effortlessly
Willy Mays HayesCF"Don't your guys go anywhere, I plan to put on a hitting display".
Hammer LongballoRFPart 2 of the Longballo Bros. Hammer is a 5 Tool player and with the Mojo to back it up.
Glovey McGlovefaceCBaseball is Glovey's second career. He runs a high power hedge fund in NYC. Sometimes he wears one of this Bluetooth ear pieces closing deals during the game.
Joltn Joe GarageiolaBenchOK Power, great contact. Ol Joltn Joe can give you a hit when you need it. Has some peculiar pregrame rituals.
Skweez BundtBenchShort Pop Fly power, can barely make contact but can field decently with a decent arm. No surprises what Skweez is up to when he is called in to hit.
Jacque StrapBenchWith a name like his you at least need confidence. 99 Mojo, dude is energetic to say the least. Locker next to Hammer, which Hammer complains about often.
Sabre MetricsBenchSpeed and Contact to deliver timely hits when needed. Calculates his BABIP in real time after each AB.


Harry ButtsSPThe Ace. I guess its sorta my fault when I said Middle School Humor was acceptable, but hey should be a fun season talking about Harry Butts Pitching Dominance.
Hole CamelsSPDistance cousin is a starter for the Phillies. Junk ball pitcher with great accuracy. Ground ball machine.
Blaze N. KaysSPConvinced he can throw it past anyone. Off-speed stuff is sub par so he relys too much on the heat.
Ed HarrisRPOld Ed Harris limps out of the bullpen when skip needs him.
Ross N. BaggRPNo Heat, No Junk, Not much accuracy. Ross N. Bagg pretty much just sits in the bullpen working on closing hedge fund deals with Glovey McGloveface
Ricky VaughnCPWild thing Vaughn, straight from his playing days in the California Penal League. How did you get there, "Stole a car"

Below is a list of all the players attribute values.


Jack Longballo1B532219201074
Green Gras2B502147472555
Benny RodriguezSS372234284170
Jake Pounders3B631936243363
Casey RoyalLF603021281255
Willy Mays HayesCF56160324568
Hammer LongballoRF604858435367
Glovey McGlovefaceC531019384374
Joltn Joe GarageiolaBench305418152460
Skweez BundtBench182412424260
Jacque StrapBench60181262499
Sabre MetricsBench115360131270

Harry ButtsSP73485845
Hole CamelsSP63445150
Blaze N. KaysSP54604051
Ed HarrisRP7314546
Ross N. BaggRP5531287
Ricky VaughnCP73601515

So there we have the opening day line ups. I will start the season with the EGO set at 40. The EGO is a measure of how difficult the game is. I played a pre-season game with an EGO set to 50 and was beat 9-4. Hopefully the 40 EGO will make the games nail-bitingly close. I will adjust the EGO as needed.

Tuesday, May 17, 2016

Desk Workout Powershell

I work in IT, which means I have the opportunity to sit for about 7-8 hours a day. I hate this. Therefore I try to run over my lunch break, I purchased a desk cycle to pedal while I am sitting, and recently I added another tool to my Battle the Sedentary work lifestyle toolbox: Weights.

Me and a buddy started doing some weight trainnig at the desk. We brought in a pair of 25 pound dumbbells and a pair of 10 pound dumbbells. Now we are doing some weight training at our desk by executing burnout sets (as many as you can lift) with various exercises.

A frequency of every hour was decided on meaning at the top of every hour we would complete a burnout set of an exercise in a round robin format. Of course some days you get head down in some work and sometimes may forget to execute your burnout set. Therefore we had a need to build some kind of notification system to remind us its time to workout.

Sample Desk Wrokout Toast Notification

Thus the DeskWorkout2.ps1 script was built. The first version would pop up an HTML file based on what exercise was up in the list. This worked ok for a while, but I was looking for an excuse to use Windows 10 Toast Notifications. So I started searching around for a solution.


I quickly found a python solution that would create a Windows tosat notification. It is really straight forward and simple.

The original Desk Workout script was written in PowerShell so I searched for a PowerShell solution as well.


The PowerShell solution was created using the BurntToast Module available on Github. Since the original script was already created in PowerShell I went ahead with the PowerShell version. The Powershell Version allowed me to put a picture in there too, so that was cool.

I wrapped the Script with an hour of sleep. So now all I have to is remember to turn it on in the morning. I stored the various excercises in a local database and wrote a stored procedure to advance through the various workouts.

Friday, May 13, 2016

Flush Reminder 7000

Should be pretty self explanatory here. I have two sons at home and needless to say they have a hard time remembering to flush. Why not build a tech solution for it.

The Flush Reminder 7000 has a PIR motion sensor and a buzzer. It will sense motion and then will mark when the motion ends. If the measured time between start and ending motion is > 10 seconds the buzzer will play the Eye of Tiger tone to help them remember to flush the toilet.

The Code.

I am still tweaking the sensor position and some of the code, but it is working pretty good for a 30 minute Friday Night Arduino project. Video of the Flush Reminder 7000 in action.

Wednesday, March 23, 2016

AnswerBot 3000

I have been kicking around various bot ideas since reading this article: I was also looking for an excuse to purchase a Teensy. These 2 forces combined to create the AnswerBot 3000.

This is nothing spectacular, could just as easy be a web service too. In fact with a web service I would have more options and features. However there is something about a physical push button that makes this satisfying. Essentially you push a button and AnswerBot will randomly choose one of over 100 things to say.

Sometimes AnswerBot's response are timed perfectly, sometimes they are a little weird.

AnswerBot: reality hits you hard bro

That is an actual quote from answer bot. The inconsistency of his responses makes it funny. Especially in your IM conversations with friends and colleagues throughout the day.

So basically you just set NUMBER_OF_WORDS to the number of phrases you put in the char array. Upload it and you are done.

I surrounded AnswerBot 3000 with legos to make him look cooler. I'd like to purchase a smaller bread board so i can reduce the footprint. No soldering done here because this is a temporary project and I do not the trouble of desoldering.

So there you have it. AnswerBot 3000 version 1. Any parting words Answerbot?

AnswerBot: that is unreal

Friday, March 11, 2016

Python Web Cam Time lapse

I was tired of using this bloated Java software to do my time captures. So I did a couple searches and found out Python can do it in just a few lines of code.

First I had to install pygame. I had some trouble doing this using the standard PIP command. I ended up finding the whl here:

I downloaded the whl file and ran

pip install pygame-1.9.2a0-cp27-none-win32.whl

From there I found a quick sample script to capture image. I had multiple cameras on my laptop so I just disabled the one I didn't want. I assume you can pick a camera using pygame but "ain't nobody got time for that".

So this will loop through 1000 times snapping a picture every 5 minutes. I turned it loose and will see what happens over the weekend.

Monday, February 22, 2016

TFS PowerShell Query Blink(1) Integration

Because why not really. I wanted to query TFS with PowerShell anyway so I might as well integrate it with my Blink(1) USB LED.

Power Tools

First you need to download and install Team Foundation Server Power Tools. Here is the link for the 2015 version:

Make sure you do a custom install because for some reason the PowerShell cmdlets are not selected in the default install.


I created this script to connect to our TFS server and connect to the project I wanted to monitor. I wanted to see all defects that were not closed, back log, or resolved state.

This will take the current count from TFS, and compare it with the previous count stored in a text file. I know this is low tech but I wanted a quick solution.

Blink(1) Integration

You can do whatever you want with the basic count code. If the current defect account is lower than the previous you can send an email, update a database, update a webpage, whatever. I enabled the API on the Blink(1) and decided that I would play a color pattern if the defect count was lower, and a different color pattern if the defect count was higher.

Final Script

So then I set the PowerShell Script to run every 5 minutes using task scheduler.

powershell -file "C:\scripts\CRM_DefectCount.ps1"

If the defect count goes up I display the Fire Engine Pattern, if the defect count goes down I display the dancefloor pattern. Below is a video showing how it works.

Sunday, January 31, 2016

Party Button Version 1 Amazon Dash Hack

I previously blogged about the Amazon Dash button hack here and here. I decided to step up the Dash button game a bit an create something cooler. Introducing the Party Button.

I have been messing with relays and the Arduino this weekend so I decided to incorporate all that fun into a Party Button using the Amazon Dash. When you start a party a python script is started that sends a signal to the Arduino to fire up the relay. The Relay controls an outlet that has party lights and a stereo receiver atached to it. Everything is powered on and then the Python script will pick out a random song and start it up using VLC command line.

Python Script

I used python to setup the ARP sniffer (needed to sense when the Amazon Dash Button was pressed), pick out a random song from a directory, send a signal to start the relay using the Arduino, and play the selected song using VLC.

I had to send the off command (HIGH signal or 1) to the relay at the start of the script because when you activated the Serial port using Python it would automatically reset the signal to the Relay causing it to come on. So I set a sleep command to sleep 5 seconds and then send the off signal to turn off the relay.

Since the ARP sniffer required Linux to work properly (scapy library works out of the box in Linux) a nice side benefit was the fact I could send a signal directly to the serial port using the pySerial module.

Party Button Test Rounds

So we went through a few test rounds of the Party Button. I uploaded the video to YouTube. You can see I had 2 handy wingmen helping me with the testing.

Saturday, January 30, 2016

Arduino Relay Outlet

Finally started to dabble with relays and AC power. Insert the normal when you are playing with power you can die warning here. Make sure you know what you are messing with before proceeding.

My end goal is to have 8 outlets that I can turn off and on. This post will show you one outlet.

Parts List

Helpful Article

There are tons of articles out there on how to hook up a relay to an Arduino, however it seemed most were lacking detail. I finally stumbled on this awesome article and was able to adapt it to the 8 Channel Relay:

Specifically this image. I spent a ton of time trying to find something like this.

The pic above is what I ended up with.

  • Hot wire (black) from power cord is wired to common (middle terminal) on the relay.
  • Connect hot wire (black) into NO terminal of Relay and connect it to hot terminal (gold) on your outlet.
  • Ground wire (green) from power cord connects to Ground (green screw) on outlet
  • Neutral wire (white) from power cord connects to Neutral (silver screw) on outlet
  • From Digital Out 7 on Arduino to IN1 on Relay module. IN1 is the first channel
  • From VCC on Relay to 5V on Arduino
  • From GND on Relay to GND on Arduino

You will want to make sure your connections look cleaner than the above screen shot. I went back and cleaned them up and added some electrical tape reduce the risk of a short and or shock.

Arduino Code

You can test the relay before adding the juice, to make sure your wiring is correct. This script will turn the relay on wait a little bit, then turn it off. It will cycle through like this in a loop so you can test it out.

From here you can get more advanced and trigger the relay based off other conditions such as sensor output, etc.

This is my first step towards working with Christmas light automation. I am also working on an Amazon Dash Party Button hack that I will blog about shortly.

Wednesday, January 20, 2016

Link Dump 1/20/2016


Here at the office we have a never ending, pretty much daily Nerf Gun War. The battles typically start without much warning when someone fires a shot in your general direction. We have a vast assortment of Nerf Gun and ammo to choose from.

To liven things up a bit some co-workers also bought a thunder pack of smaller Knockoff Nerf Footballs from China. Throughout the day a football will enter your airspace without warning. Thus the need for MAWS

Missile Advanced Warning System

I wanted a way to know when a missile or other large object was incoming to give me time to duck or at least brace for impact. I also wanted a reason to order some PIR sensors for the Arduino. I was the lucky recipient of an Amazon gift card for Christmas so I quickly ordered a pair of sensors.

Hooking the sensors up to the Arduino was a cinch. Basically I just wanted to light up an LED when the sensor noticed movement. The sample code worked perfectly. All I had to do was add another set of variables to control the second sensor. MAWS is outfitted with two PIR sensors for double, that's right double the motion sensing power.


Inital testing indicated that there was little chance MAWS v1 would pick up the Nerf Elite Strike darts. These darts are small and travel fast (especially from the modified Nerf Guns in the office) to be detected by the 2 dollar PIR sensors I purchased.

The NERF Mega darts are also too small to be detected. The MAWS system did pick up a few shots from the Mega darts but the success rate was very low.

Larger projectiles were detected...sometimes.These include Nerf footballs and other various soft projectile type objects.


No fewer than 5 minutes were spent in MAWS construction. This is all prototype so nothing fancy was needed. I grabbed a couple cardboard boxes and a box cutter. Since this was a prototype I decided to just tape together wires with electrical tape to extend the reach of the LEDs.

I taped the LEDs to the top corner of my monitor and ran the MAWS system up to the top of my cube. I moved it back a little so the MAWS system would not pick up my movements for false positives.


The MAWS system is performing at least as well as in the initial testing. I'd say the success rate is about 2.5% just spit-balling. I'd call that a successful project (considering my past projects). I mean imagine if 1000 projectiles are being thrown my way. That is 25 projectiles that are successfully identified before impact...not bad.

It has been a good conversation piece if nothing else. Also it functions well as an advanced warning system if a visitor walks up behind me. So all and all not a bad project.

I imagine if I swing for some more pricey sensors I would have a bit more success.