Ice Bucket Challenge with Azure/Windows Phone/Netduino across 10,000 KM

Tweet about this on TwitterShare on FacebookShare on RedditShare on Google+Email this to someonePin on Pinterest

A friend of mine, Dominic Lennon, challenged me to the “Ice Bucket Challenge”. I decided to do it in style – also, I like building things.

Update: Taylor and I are in the Mercury newspaper (24/09/2014):


Now, a number of people have a problem with this challenge, but I am all for it because:

a) It is raising awareness. I had no idea what ALS was, and now I do. It’s made me do a lot of reading about something I was clueless about, which is great.

b) It is raising money. Some say it is taking money that might have gone to other charities away, but in my case that simply isn’t true. I had no plans to donate other money that I cancelled due to this. I would have spent the money on electronics I probably don’t need.

The real issue is that most people simply seem to forget it is about the money. So I’d encourage people posting videos to remind viewers of that fact.

I donate to ProjectALS. They have a great score on Charity Navigator, and are one of the more reputable organizations, who apparently give 90% of the donations directly to research.
OK, onto the technology!
I was originally going to use Cortana, sort of like in my previous post. “Cortana, I’m not cool enough” -> *Bucket falls*. But Dom suggested the stakes were too low.

So the final solution was to use a Netduino Plus 2 that was controlling a servo to drop the bucket. The Netduino was polling an Azure service waiting for a command of “1”. Then 10,000 KM away, I gave a Windows Phone app to Dom that would push a command to the Azure service.

If that wasn’t enough Microsoft tech already, we used Skype to sync up, and Dom was using his Xbox One. Finally, the video is recorded with my Lumia 1020.

I made a very technical to-scale drawing to explain better:


In the video you’ll see him holding the button and then releasing. The command is sent when he releases. There is about a 2 second delay which is pretty impressive considering the number of things that happen along the way.

The code for all of this is really simple. I could have made it a lot better, and also used push instead of polling to reduce latency.

The Azure service simply had a static variable that a POST writes to. Then a GET will return it. This is a naive approach for any real-word scenario with multiple peers.


Next, the Windows Phone code that writes to that has two buttons: The first  is a small reset button to tell the servo to return to its starting point. The large button sends the command to drop the bucket.


Finally, the Netduino code is just an endless loop of reading from the service and checking the result. If it is a 1 then it moves the servo to 180 degrees (causing the rope to slip off and drop the bucket. Any other value and it resets back to zero degrees.


Down with disease!

Tweet about this on TwitterShare on FacebookShare on RedditShare on Google+Email this to someonePin on Pinterest
  • Tarun Pothulapati

    Did You use Mobile service as the azure service?

    • RogueCode

      Sorry for the delay. No, I used a normal Azure Website for it.

  • Gertt

    Hi I thought this would be a perfect solution for a starter, cause this exactly the protject I want to make with the Netduino and my phone. Only now I found out that this not really an example for me cause I can’t figure out where to put the lines ): you provided? I know I should study (and I,m working on it) Is there a way I can see the hole solution?