Monday, September 1, 2014

Galileo NetworkSerial – Port 27015

Creating a network client on the Windows Version of Galileo is what I would call trivial!

There is however a catch, in the initial SDK that was released the only port you can use is hardcoded at 27015.  If you look towards the top of the GitHub file you’ll see the DEFAULT_PORT.  Maybe I missed it but I couldn’t see anywhere to override this.  Once you understand that, reading and writing from sockets is as simple as this:

image

Simply create this program, then on your PC open up telnet and connect to port 27015.

Hopefully in a future version of IoT you’ll be able to use different ports.

-twb

Sunday, August 31, 2014

.NET Hacker Room at Code Impact

If you haven’t done so yet, you should register for Code Impact up in Jacksonville on September 13th.

I’ll be hosting a new tradition in FL Code Camps a .NET Hacker Room.  A .NET Hacker Room is a unique experience that will allow you to see and play with some of the latest hardware technology.  

This room will offer things like
- Internet of Things
- 3D Printers
- Quad Copters
- Windows Galileo
- Robots
- Netduino's
- Oculas Rift (V2)
- More!

Also throughout the day, come in for 10-15 minute lightening talks on the above topics.

See you there!

-twb

Tuesday, August 19, 2014

Inaugural Tampa Internet of Things Society Meeting

As of August 19, 2014, the Tampa Bay .NET Microframeworks Group will start a new Chapter as the Tampa Internet of Things Society meeting.  What’s with the name?  Just seemed appropriate…

Here are the slides from the inaugural meeting.

 

-twb

Running Windows on Galileo – Off The Shelf

As of yesterday 8/19/2014, you can take a standard Galileo and run Windows on it.  This is a $50 piece of off the shelf hardware you can purchase off of Amazon and get started with the Internet of Your Things.Intel GALILEO Single ATX DDR2 1066 Microcontroller Motherboard GALILEO1.Y

What you will need:

  1. Galileo – From Amazon for $50 as of the time of this writing, of course available with Prime
  2. USB Network Adapter – From Amazon $11
  3. 16GB Micro SD Card – From Amazon $11

You’ll also need something to write the files to your MicroSD card, you probably have something like this.  Also the MicroSD card comes wiht a full size SD Card Adapter.

Most of the steps you need to get up and running can be found on the MS IoT update page.

Here are some things I ran into while setting up my environment.

Upgrading your Galileo to 1.02 Firmware

When you get your device, it will more likely be a 0.7X version to run with the new Windows Environment, you’ll need to upgraded it to 1.02

First off you’ll need to update your Galileo, you’ll need to install the Arduino 1.5.3 environment from the Intel site, so copy this to your hard drive, there isn’t an install, but you’ll just need to copy your files over to somewhere on your hard drive.

To update your Galileo you’ll need to apply power to it and plug the USB cable into the port labeled USB Client, this is the one next to the jack that looks like it’s for headphones (it’s not, but that’s a different story).  Start Device Manager and keep it open.  Then you need to wait, it could take 2-3 minutes, so be patient.  Look for a device named similar to Gadget Serial V2.4, or an additional Serial Port, again, don’t get worried if this take a little while.  If you have a new serial port, you are good-to-go.  If you don’t then you’ll need to install the drivers for the new device.  To install the drivers for your new device to let it work as a serial port.  Right mouse click on that device, select Update Driver Software

image 

Then navigate to the folder that is installed in and install the driver.
image

Once you do so, you should see a new port, it should be the one with Abstract Control Model:
 image

Once you have that, then you can start the arduino IDE:
image

Make sure the port that is identified above is selected under Serial Port
image 

Then click on Help ->Update Firmware, this takes 5 minutes.  Make sure you Galileo is plugged in to the wall and you do not disturb the device while it’s updating or your could Brick your device.

Burning the SD Card

This is relatively straight forward, and you just need to let the process run on my machine it took about 1 hour to burn the file onto the SD Card

Getting your PC Ready

There is a really good guide here that gets you going, however you’ll need to install the standard Telnet client on your machine from Add/Remote Windows Components.  Then you need to install the MSFT IoT SDK from here (for VS.NET 2013 Ultimate, for other editions please see the prior link).

Getting your Galileo Online

Great Step-by-Step instructions here.

Compiling Your Apps

Before you go off and create your next big thing with the Galileo it’s probably a good idea to make sure that you can compile a simple example.  After you installed the SDK, you’ll see a new option with File->New->Project

image

Once you do that you’ll see a very simple program that will toggle one of the I/O pins and write something that will be sent to the Debug Output window.

An important note here – To Deploy applications from VS.NET to your Galileo you may need to Open Outgoing Port 4018 on your PC’s Firewall.

That’s it!  Now you should be able to run the samples and build some awesome stuff!

-twb

Friday, July 25, 2014

Tampa IoT Society – and the start of a new era

This morning before I started my client work, I took a few minutes to configure my highly customized Intel Galileo board and was able to successfully run Windows on a Very Small device.  I’ve order some really cool parts from SparkFun that I hope to integrate with the board over the weekend. 

MyGalileo

Also – today I am announcing that I am formally rebranding the Tampa .NET Microframeworks Group as the Tampa IoT Society. Our next meeting August 19st  will be dedicated to going through how to get started and what you can do.  I’ll also be sharing and discussing our vision of what we will be looking at for the next 12 months.

-twb

Friday, June 20, 2014

DataBinding 101 – AppCamp Materials

On June 20, 2014, I will be presenting on DataBinding for your applications at 2014 AppCamp Tampa.

And here are the completed demo files

 

-twb

Sunday, June 15, 2014

Cloud/Azure Based HVAC System at Casa De Wolf

The Problem

We live in a house that has four heating and cooling zones in it with a Heat Pump that isn’t exactly cheap to run.  The different zones makes the electric bill a little less painful in that we can only heat and cool the rooms we need to.  For example at night, we keep our bedroom relatively chilly at 68f while I let my office warm up to 80f.  While I’m working, I cool my office to 76f and let our bedroom warm up to 80f. 

To enable this heating and cooling we have thermostats in each room and dampers that shut off the airflow to the different zones when we don’t need to heat and cool them.  The brains for this is a small embedded controller.  Our house was built in the early 90’s and the controller is the original one that came with the house.  This means the user interface on this is very dated and setting it requires and engineering degree (we’ll not really but I’m the only that knows how to do it and it’s a major pain in the butt).  Also since it is so difficult to set, I’m sure we are wasting considerable energy heating and cooling rooms that we don’t have to and really have no way of monitoring the usage.

In addition the only control we had was at the zone level.  That means that to cool down one room we needed to cool down all the rooms in the zone.  This was a problem in that my office has a lot of computers and takes more to cool down than my wives office.  Her room was cold while my room was just relatively comfortable.

The Solution

Of the past few months I’ve been building a new controller for this, I created my own board base on STM32F407 with the following features:

  • Solid State Relays to Control the HVAC systems (cool, fan, compressor)
  • Solid State Relays to Open and Close the Dampers for the zones
  • Motor Controllers to control vents embedded in each room to heat/cool individual rooms
  • Ethernet MagJack and Controller
  • Real Time Clock
  • MicroSD Storage
  • Electric IMP

I have four Insteon wireless thermostats and have also hardwired a number of DHT22 Temperature Sensors so I could monitor temperatures in rooms without wireless thermostat.

So with all this hardware in place I needed some way to monitor the different room temperatures and determine when to turn on the HVAC system, open and close the dampers and vents.  Originally my plan was to just program everything on the primary board, but want to make sure I get the kinks worked out of the system first.  After all it gets very hot in the Florida summers and my wife wouldn’t appreciate any bugs in the software that would cause our house to get unbearably warm.  So I decided to write the controller software in .NET and have something I can easily update and monitor.  I needed a home for this and considered running on a PC on my network, but decided on putting this as an Azure Worker Role.

Basic workflow

1) Worker Role talks to the controller board and pulls the temperatures
2) It then compares the temperatures to the setpoints at a room level
3) It then determines which rooms and zones need to be cooled
4) After it figures out what it needs to do, it sends commands back to the controller board to activate the heat pump and open/close dampers and vents.

Programming

Programming the System is accomplished with a Windows Phone 8 application.  This updates the worker role, which in turn saves the settings to Azure Table storage as JSON.

Web Site

You can take a live look at my system by going to http://lagovista.cloudapp.net:8095/

Over time I’ll add some additional parts to this post as I evolve my system, but feel free to contact me if you want more information or have questions.

-twb