Monday, December 10, 2012

Netduino Serial Demo Sample

Last month we ran out of time in our meeting before I could finish up my serial data demo.  At that time I promised to get some sample code out there…all I can say is I’ve been very busy and better late than never.

The demo program I created which was called SerialIODemo is a very simple mechanism to send commands and arguments from the desktop down to the Netduino via a via a FTDI USB Serial port.

Connecting the two is very simple, just run wires as follows

BLACK  FTDI->GND to Netduino GND
GREEN FTDI->TXD to Netduino 0 (On the Digital I/O bank)
YELLOW  FTDI->RXD to Neduino 1 (On the Digital I/O bank)

Then of course you’ll need to connect both of these to your computer via USB.  The following picture should give you a good idea of how this should look.  Note the green wire is in the pin closes to end of the connector.

image

Fully Connected

image

Connection to FTDI

image

image

Connections on Netduino

After you have made your connections and plugged in the USB connections to your computer, you’ll need to check the Serial Port the FTDI is connected to. this can be done via the Device Manager under ports.  In my case, I’m on COM1

image

You’ll need to modify the code to connect to this port (TODO: Could have this configurable through the UI).  This needs to be done in MainWindows.xaml.cs in the DesktopApp project

image

Once you’ve done this you should be ready to go!

To use the app, simply make sure both programs start.  This can easily be done by right mouse clicking on the solution node SerialIODemo and setting both projects to startup.

image

Now start your program, give the Netduino a few seconds to warm up and press Connect.  When you do so, the Netduino should respond back as in the screen below.  If you don’t see this give the Netduino a little longer to start.

image

Extending the App

The idea behind this application is to invoke different commands by sending a string from the computer to the device.  The string will be in the format “command=arg”.  A switch statement in the device code will handle different commands and the args can be used to make those commands work with different “stuff” on the device.

image

image

image

Hope this gets you started on controlling your Netduino with your computer!

-twb

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