Showing posts with label Electric IMP. Show all posts
Showing posts with label Electric IMP. Show all posts

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

Sunday, March 9, 2014

A “Bug” in my Software

As a beer drinker, I’ve discovered Home Brewing over the past couple of years.  As a hardware hacker I needed to combine my love for beer with my love for hardware. 

After finding out how much of PITA it is to bottle my home brew, being the lazy I’ve gotten into Kegging and have this awesome kegerator. 

image

 

As an hardware/software engineer I couldn’t resist the urge to create little board to control the temperature of my kegerator.

image

In case anyone cares about the board…the two blue terminals on the left take in 120VAC on one set.  The other set provides switched 120VAC to control the compressor and thus the temperature on the kegerator.  The white component directly to the right of the terminals is a 120VAC to 9V converter, the black box on top of it is a relay and the smarts on this board is an Electric Imp on the top right.  The little gold terminals at the bottom are where a thermostat is connected as well as a serial output for a display.  Contact me if anyone wants the eagle files, it’s actually pretty easy to assemble.

This board has a 4x20 LCD character display on it as shown in the picture below (inside a 3D printed case).  As you can see the display looks terrible, a considerable number of rows are no longer lighting.

image

 

Upon closer examination, there is a “Bug” that somehow got into side the display and looks like it screwed it up :) poor guy…

image 

-twb

Wednesday, June 19, 2013

Tampa Bay NETMF Meeting – Home Automation on Windows Phone and Windows 8

Starting with this meeting, we will be at the AgileThought, Inc. main office building at Rocky Point.  Doors will open at 6PM on July 16th for food/social with the main presentation starting at 6:30 PM.  Mark your calendar, moving to the AgileThought office will allow us to reserve the room on a consistent night, so right now we are planning on meeting the 3rd Tuesday of each month at 6:30PM.

In the July membership meeting we will be going through Kevin Wolf's Windows Phone and Windows 8 application he's calling Lago Vista that he wrote to control his house using Netduino, Insteon, whole house audio, Electric IMP technology as well as some IP cameras.  We will be digging into the code, and discussing what he learned as he installed, configured and programmed over 30 distinct lights and controllers.

Some of the more interesting aspects that he has automated

- HVAC and Heating/Cooling Zone Controllers
- Voice control of IP cameras through a Windows Phone App
- Control of speakers/audio through out the house and back yard with Netduino
- Pool pump, spa/pool diverter and heater control
- Creating multiple scenes for different activities like taking the dogs out and watching movies
- Control temperature of a freezer to achieve a consistent and optimal temperature for fermenting beer

Hope to see you there!

Monday, December 10, 2012

December Tampa Bay NETMF Meeting and Hackathon

When: Meeting - December 20, 6PM-8PM, Hackathon December 21st, 9AM-?
Where: Tampa Microsoft Office, 5426 Bay Center Dr. Suite 700, Tampa FL, 33609

Monthly Membership Meeting

This December we are going to turn our focus to having your small embedded device such as a Netduino communicate to the the Internet.  We will also be looking at the Electric IMP.  Something on the very cutting edge, but also something very cool!

This months geek shopping list

1) Electric Imp and Dev Breakout Board
2) Netduino Plus 2 or Ethernet Shield (Ethernet Shield will attach to your standard Netduino and will require a bit of hacking to get working.  We probably won’t be covering this in our meeting)
3) WiFly and XBee Shield add WiFi to your Netduino, again we won’t be covering this in the meeting but isn’t that difficult to connect and configure.  I’d be happy to answer any questions on this via Email.
4) Pen Type Multi-Meter really helpful once you really start getting into this stuff.

To register for this event, please click here.

NETMF Hackathon

In addition, as a bonus this year, Bill Reiss and I are going to be hosting the Tampa Winter Games and NETMF Hackathon all day on Friday December 21st at the Microsoft office in Tampa.  As we have seen in our nightly meetings, two hours is just enough time to get started with this stuff.  Why not make a full day of it and hang out with some like minded folks getting your “geek" on.  The format will be a couple of talks to kick the day off, you’ll get to hear Bill (great speaker!) get you going on developing games on the Microsoft imagePlatform.  I’ll also give a brief talk on something cool that runs on a very small processor.  Then throughout the day, we’ll have a series of lighting talks to cover small bits and pieces of both gaming and microelectronics.  The primary intent of these events are really just to hang out and work on some cool stuff, along with your peers that might be able to help you if you get stuck on certain areas.  I’ll probably be working on my NiVek QC1 along with some cool new 32 bit hardware and my Windows 8 Ground Station. 

I’ll bring my collection of Netduino Shields and other assorted electronics for folks to play with.

To register for this event click here.

Both events should be a blast, hope to see you there! 

-twb

Saturday, October 6, 2012

Talking to an Electric IMP with Windows 8

Ok – your first question is “What the hell is an Electric IMP?”  My lazy answer is - check out their web site for the best answer: http://electricimp.com.  

But in a nut shell, it’s a small little electronics module with the primary focus of connecting to the internet and controlling hardware.  This hardware can be something as simple as a relay to control a light or as complicated as a sensor that uses I2C, SPI or serial communications (UART).  You have six I/O lines that can be configured for your needs, so you aren’t going to control a small factory with only one of these, but configure a 100 or so of these and it might get interesting.  At this point, this “tech” is in a very early stage, the concept is very cool, but I don’t think I’d propose doing anything commercial or for a client, well at least just yet.

So let’s start where it all begins, here is my little Electric IMP that I purchased from Spark Fun. 

And here it is in it’s home in an SD socket that’s part of the Breakout Board for the IMP.  A couple of things to note on this.  First, this is not just socket for an SD card it has a specific pin out for the IMP.  I’m really not sure why the IMP is in this form factor, probably just to have a nice little carrying case.  Second, although it connected with a USB cable this is only there to provide power.  The data lines are not used.  Third, those little white headers did not come with the break out board, I soldered these on there.  It really is a very basic soldering activity, so don’t let that scare you.  To use the power from USB, simply place a jumper on, or just hardware the two pins as shown on the board below.

image

In my picture above, you can see the green glow of some internal LED’s.  This is because I’ve already registered my IMP with Electric IMP’s server.  Everything you do with this IMP goes through their server.  Ok, you are probably now thinking what I was/still am thinking….”hmmm…actually I don’t know what to think about that…and…I’m still at the jury is still out point on this having long term legs…but it is sooooo cool, I’m going to give it the benefit of the doubt”.

Ok back to the content, my IMP is green, if you plug a new one in, yours won’t be.  To get your IMP green, and thus have it registered so you can use it with the Electric IMP server, you need to signup for an account at http://electricimp.com, download an iPhone or Android (what no Windows Phone?!??) app.  Then, do something that I think is very cool, turn the lights down in your room, no seriously do this it works better in a darker room, run the app, follow the instructions and hold the screen of your non-Windows Phone device, next to the front edge of your IMP as pictured below and press the “Send BlinkUp” button on your “other type of phone”.

image

When you do this, you’ll see the screen flash black and white, white and black, really fast.  Hmmm…reminds me of one of my favorite books Snow Crash.

After a little while, your IMP will also be green, just like mine.

Programming

So, next you’ll go to their web site with Chrome (another editorial note, they don’t support IE, but they say they are “working on it”, yyyyyeeeaaaahhh, I’m sure that’s towards the top of their priority list) and if you click on the “impees” you’ll see that your Imp has been registered.

My Imp

image

You can see this is the unique id for my IMP and MyFirstApp is the program that was downloaded to the little device.  I have a feeling that Unique ID isn’t something I want to have published…hmmm…dunno?!?!

Code

So next, click on the Code tab, and click on "”+” to create and save a new program, I called mine “MyFirstApp”.  The code should be similar to below:

image

//Windows 8 Test App.

server.show("Waiting for Windows 8");

class MsgInput extends InputPort
{
    constructor(){
        base.constructor();
    }

    function set(value){
        server.show(value);   
    }
}

imp.configure("Windows 8 IMP Client", [MsgInput()], []);

//End of Code

This is a little Squirrel application.  Basically it writes the message “Waiting for Windows 8” to the server and the IMP’s display (on the soon to be explained planner), then it creates a class that extends InputPort that overrides the set method.  The set method get’s called from Windows 8 from a call over the internet (more on this very shortly).  Then inside the set method it simply echo’s the value to the IMP’s display.  Finally it just configures the IMP with a name, and specifies the MsgInput class as an input port for this program.

Planner

Now we need to “program” the IMP.  Go to the “Planner” tab, find your IMP’s node and select the program you just created, in our case “MyFirstApp”.

image

That’s it, your IMP is ready to go!

Adding Input Port

Next we need to add a node to wait for a value coming from our Windows 8 app.  To do this, select Add Http In.

image

This will drop a new node on your planner, go ahead and click on the “+” to attach this HTTP In node to your IMP’s node.

image

So now you’ve visually connected the HTTP Input Port to the app running on our IMP.  Remember, you have a subclass of InputPort that overrides the set method when the HTTP In node gets activated.  Next we need to figure out what the HTTP IN node actually does, click on the little settings/slider in the upper right hand corner by HTTP IN and it will give you the URL for this input port.

image

So basically all we need to do is post a value to this HTTP end point and our IMP will pick it up.

Windows 8

Just create a simple Windows 8 Application and add a simple button as above (or some other way of triggering an event in the code behind).

image

Then in the code behind, add the following handler:image

 

var clnt = new HttpClient();
var content = new StringContent("value=What+is+up+Imp");
content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/x-www-form-urlencoded");

clnt.PostAsync(“https://api.electricimp.com/v1/[YOURADDR]”, content);

Make sure you replace [YOURADDR] with the address from the External Service message from the planner.

Time to Test our Application

This should be what your Planner screen look like before the Input Port is invoked from Windows 8.

image

Time to run our highly sophisticated, and well designed app!

image

Press the Say Hello button and now your planner screen should look like:

image

Which is the message we sent from our Windows 8 App.

var content = new StringContent("value=What+is+up+Imp");

I’m excited to find more time to play with this, it looks like it has some interesting potential, but getting started is really easy and it requires very little to no knowledge about Electronics. 

-twb