Azure, Raspberry Pi connecting them at low cost

If you haven’t checked it out, and I am for sure, check out the Connect the dots site, if you have a Raspberry Pi, you really don’t need an Arduino.  Get your Raspberry Pi loaded with the Debian build named Wheezy.  Then try not to waste time on playing around with the Raspberry Pi, MineCraft Pi is fun, and so is Python, but stay focused.

What is an Event Hub?

It’s a long story, if you want to find out more you can check it out here on this MVA:

Now a little story about why you want to learn about Event Hubs, this is where you own the cloud, so to speak.

Why an Event Hub

In cloud technology, there was a time where people had old computers sitting around with old versions of Windows, and there was a cost to upgrade your O/S.  Keep in mind this was back in the day that people would pay $2000+ for a piece of junk computer.  These were computers that were less powerful than your current phone.  So students, hobbyists and scientists would set them up with Linux, for a number of reasons, but let’s go with Unix based. 

Then someone wanted to go for a record of most Linux servers and the Beowolf clusters were created.  This is where you have 1000 old computers hooked up as one super computer.  This is sort of what the cloud is all about.  BUT…how did you hook up sensors to this nascent cloud?  And did you need to always communicate with the Beowolf Cluster, which even if the computers were free, occupied resources needed for computing, communicating, etc.  So separate smaller computers, which were similar to the Arduinos we use these days would collect data.

But where to store that data till it could efficiently be used by the Beowolf Cluster, one way would be to set-up one of the out lying computers to act as a hub.  These days through the magic of chip design we have the Raspberry Pi or Galileos or the Edison or ….  Any of these can act as a hub.  In the Connect the Dots you set up a service bus to use the Raspberry Pi as a hub to collect data from the sensors in the Arduinos.

What’s the point here?  The Raspberry Pi can act as a Event Hub for any processing system you may need to use.  Keep in mind your processing system may be a vehicle CAN bus, you are recreating the experiment in the movie Twister and your event hub would be Raspberry Pi to collect data from the little flying objects that the actors are trying to get into the Tornado.  The sensor system is called Dorothy, small radio circuits fly up into the sky and radio back radio data.  Pretty cool for 1996.  The receiver in our example is the Raspberry Pi.

Now we use the appropriate Mesh radio system, likely lower frequency because lower frequency improves range when there is atmospheric obstructions.  The Raspberry Pi now collects the data and waits till it has a good cell connection to make the upload of the data to Azure.  In 1996 it is likely that the scientists were using a Beowolf Cluster somewhere to do the number crunching, although the movie shows the data being collected on site.  Considering the power of mobile computers in 1996,  it is unlikely that there was much processing being done locally by researchers who were on an NSF grant.

So, get started with your Raspberry Pi, you will need to make your Raspberry Pi function as an Event Hub

How would that work? 

Now Mono works nicely on Wheezy, but you have to add it.  Wisely the open source group that created the Wheezy build, want to keep the build simple.  But you can install C# easily by using the instructions at:

Here is a short list of links to instructions on how to install Mono on the Raspberry Pi:

Then if you are brave, you can download and give Windows 10 a try, but my recommendation is to get used to using the Raspberry Pi with the Wheezy build, then move to Windows 10.  The Windows 10 build requires that you have a system running Windows 10 to do the installation, which is good, but it is a beta version and you should only do the Windows 10 if you have a spare machine.

In a future blog we will take a look at the connect the dot issues that you might encounter, even though the Connect the Dots is an excellent sample code.