Tagged Posts

15 years ago a guy named Shaun Walker released something special unto the world. Something that would ultimately change the way Microsoft approached Open Source. Shaun released a CMS tool called IBuySpy Workshop, a modified version of IBuySpy Portal. The IBuySpy Workshop ultimately became DotNetNuke, now known as DNN (I’m nostalgic for DotNetNuke btw).

Depending on what the "source" is, it appears that DNN 9.0.1 was released either 11 days ago, or 3 days ago.

So which is it, 11 or 3? Who cares, let's just go over some of the basics of what the release covers.

First off, there are a number of security updates in this release, primarily around API security.

With the release of DNN Platform 8 last week it is now possible to develop modules using SPA and MVC patterns within the DNN platform. As Part of the buildup of the DNN 8 release, Will Strohl provided a Pull request to my DNN Extension Project Templates project to help clean up some of the basic module templates to work better on Windows Azure environments, and to prep them for inclusion of new DNN 8 specific templates for SPA and MVC modules. Early in the fall Joe Brinkman provided a partial SPA project, with the intention of it becoming a project template. I had a little time when it was initially submitted to work on it, but wasn’t able to get everything squared away on the template until early December. It wasn’t until last week that I got additional time to do further testing on the template and fix a few issues that occurred during the conversion to a project template.

With the release of DNN 7.3.0 this week, it was time for me to get my sites upgraded. I upgraded most of the sites without any issues, but wanted to point out a few errors that I received on sites, and how I resolved them.

The very first upgrade I did started out bad, it was for this site, and while the upgrade was 100% successful, as soon as I tried to load the site I got a generic 500 error. Accessing the site from the webserver gave me a little more information, seen below, but not much.

I decided recently it was time to upgrade the look of my various websites, and while I originally considered modifying my MultiFunction skin for DNN, ultimately I decided to start from the ground up and create a new Skin for DNN using Bootstrap (http://getbootstrap.com), I’ve decided to call it HammerFlex.

imageJust because I don’t work for DotNetNuke anymore, doesn’t mean I am done with this fabulous platform. For my new gig at ClubReady (, I started this past Monday) I am not doing DotNetNuke related work, but I am still working on the web. I was doing some research and testing with SignalR, if you want to find out what it is, click on the link there and check it out. In short, it allows for webpages and apps to have an open pipe between the client and the server, allowing you to send information back and forth with ease.

Over the next couple of days people should be receiving their Netduino Go Piezo Buzzer Modules, at least if they have ordered them from Amazon.

I was lucky enough to get mine very quickly from Amazon and put together a sample project the other night. This is by no means a complex project, and most of it is code from the public domain for projects based on the original Netduino.

Project Overview

So what does the project do? Essentially it plays 3 “tunes” that are predefined in the code. The tunes and most of the code for the project are based on this thread on Netduino.com.

The primary method for interacting with a Piezo Buzzer module is pretty simple, you just need the following three lines.

PiezoBuzzer Pb1 = new PiezoBuzzer(GoSockets.Socket1);
Pb1.SetFrequency(####);
Thread.Sleep(####);

Socket1 would be the location where you have the module plugged in to the Netduino Go. The ### for SetFrequency is a float, 440.00 should be an A where the note C would be 261.63.Duration is an integer in milliseconds, so 1000 would be 1 second. Basically once you set the frequency you tell the program to sleep for 1 second to let the note play out.

The code in the project is a little more complex than that, providing octaves of notes and their frequencies, as well as the ability to pass in an array of notes and tempo to adjust for speed/duration.

Download the code

But enough of that, how about a video of it in action?

Other Netduino Go Projects

Be sure to check out some of my other Netduino projects and blog posts.

In case you missed the announcement on 4/4, the guys and Secret Labs, along with other members of the Netduino Community have come out with a new platform called Netduino Go. Head on over www.netduino.com for the introduction forum post.

This post is how to quickly get up and running with your Netduino Go, based on Chris Walker’s getting started forum post, with some enhancements that I think will make it easier to get up and running, as Chris’ post unfortunately leaves a few things out.

Hardware

I ordered a variety of hardware when I ordered my Netduino Go here’s a list, though in this tutorial I’ll only be using a small portion of this.

  1. (1) Netduino Go
  2. (1) Shield Base Module
  3. (2) RGB LED Module
  4. (4) Button Module
  5. (1) Potentiometer Module

One thing to keep in mind with the hardware is that each module needs a cable to be able to connect to the Go, but the Go only comes with two cables. I did order a 5 pack of cables as well, and up until about 2 minutes ago thought I left them at the office, only to realize I do have them at home, which is going to change the rest of this tutorial.

Software

  1. Visual Studio 2010
  2. .NET MicroFramework V4.2

First and foremost, you need to install the .NET MicroFramework 4.2 and Visual Studio 2010 (not sure if express will work). Chris’ post assumes that you already have .Net MicroFramework V4.2 installed. You can download this from Codeplex though to be honest I don’t know if you need the PK or the SDK, I installed both.

What will the project do?

Before we get into actually creating the project, what will it be? Well this is just something simple, nothing useful, but hopefully gives you an idea how to work with the Netduino Go.

We’re going to use the Netduino Go, one Button Module, one Potentiometer Module, and 3 RGB LED Modules. The button will be used to turn the system on and off. The RGB LEDs will blink in succession, one Red, one Green and one Blue (I realized during the development that I only had 2 RGB LED Modules, so I removed Blue from the code with comments, I ordered two more they should be here Friday. The potentiometer will be used to control the timing of the light succession.

Project Creation

For the first part of this you can follow Chris Walker’s instructions posted in the thread, copied here for ease of reading.

To manually create a project for your Netduino Go:

  • Download and unzip the attached assemblies.
  • Create a new .NET Micro Framework "Console Application"
  • Add the references "GoBus.dll" and "SecretLabs.NETMF.Hardware.NetduinoGo.dll" to your project. You'll need to use the "Browse..." tab for the moment.
  • Add the references to the go!modules you'd like to use (NetduinoGo.Button.dll, Nwazet.Relay.dll, etc.)
  • At the top of your project, add the line:
using SecretLabs.NETMF.Hardware.NetduinoGo;

From here I’ll switch out of Chris’ examples and provide my own code.

Plug your NetduinoGo into the MicroUsb cable attached to your computer. It might take your PC a few moments to find the drivers.

Right click on the Project properties and be sure to change your target framework to 4.2. You’ll also want to change the Deployment options on the .NET Micro Framework tab in the project properties, Transport = USB and Device = NetduinoGo_NetduinoGo.

The first thing we’re going to do is initialize the objects we’re going to use.

static NetduinoGo.Button button = new NetduinoGo.Button(GoSockets.Socket1); 
// this button will start/stop the flashing
static NetduinoGo.RgbLed redLed = new NetduinoGo.RgbLed(GoSockets.Socket2);
// this is the socket for the first LED

static
NetduinoGo.RgbLed greenLed = new NetduinoGo.RgbLed(GoSockets.Socket3);
// this is the socket for the second LED

//static NetduinoGo.RgbLed blueLed = new NetduinoGo.RgbLed(GoSockets.Socket4);
// this is the socket for the third LED
public static bool currentState = false; // keep track of if the button was pressed to turn it on, or off static NetduinoGo.Potentiometer pt = new Potentiometer(GoSockets.Socket5);
// the potentiometer to control the speed of the LEDs

We’re going to have a single method that turns off all the LEDs, likely not the most efficient approach, but it will do what I want. We also provide the button handler event.

//method to turn off all the LEDs
static void AllOff()
{
    redLed.SetColor((byte)0, (byte)0, (byte)0);
    greenLed.SetColor((byte)0, (byte)0, (byte)0);
    //blueLed.SetColor((byte)0, (byte)0, (byte)0);
}

//button handler
static void Button_ButtonReleased(object sender, bool buttonState)
{
    currentState = !currentState; //set the state to the opposite of whatever we were before
}

The Main() for the project is a bit longer, but nothing too complex. Basically we wire up the button handler, make sure to start in the off state, and then setup our While loop. Because we’re running on a device, this loop While(true) will just loop forever.

Inside of the loop we’re going to check if we should be on or off, if on, we go through and pass through each RGB LED Module to turn it on, then sleep for a moment, how long is based on the potentiometer, and then turn off the LEDs, move on to the next color.

public static void Main()
{

    button.ButtonReleased += new NetduinoGo.Button.ButtonEventHandler(Button_ButtonReleased); 
// setup the button handler currentState = false; //make sure we start with it off while (true) //we're using a device, it will never end { if (currentState) // see if we should be displaying the LEDs or not { redLed.SetColor((byte)255, (byte)0, (byte)0); // turn on the red LED System.Threading.Thread.Sleep((int)(100 * pt.GetValue()));
// pause for a moment based on the potentiometer state
AllOff(); // turn off all LEDs greenLed.SetColor((byte)0, (byte)255, (byte)0); // turn on the green LED System.Threading.Thread.Sleep((int)(100 * pt.GetValue()));
// pause for a moment based on the potentiometer state
AllOff(); // turn off all LEDs //blueLed.SetColor((byte)0, (byte)0, (byte)255); // turn on the blue LED //System.Threading.Thread.Sleep((int)(100 * pt.GetValue()));

// pause for a moment based on the potentiometer state

//AllOff(); // turn off all LEDs } } }

Once you have all this together you need to be able to deploy the code to your Netduino. Deploying the code is easy, simply hit F5 in Visual Studio and that should send it off to your device. From there you can see how well it works.

Here’s a video of the code in action on my Netduino Go, I’ll see if I can’t get another video done when I get the third LED module in place (only 2 for now).

For another overview and tutorial check out Pete’s blog post over on 10rem.net

UPDATE

I've updated the code to work with 3 RGB LED modules, you can find the updated code on Github at https://gist.github.com/2418912 

Here's an updated video, filmed using a GoPro, let me know what you think of the video quality.

A couple of weeks ago I picked up this Tamiya Tracked Vehicle Chassis Kit with the intention of using it with my Netduino. I put it together, but didn’t get around to doing anything with the kit and the Netduino until tonight. Part of the reason I didn’t get it going was the fact that I didn’t have my Adafruit Motor Shield together, I managed to get that completed over the weekend (minus one solder I found that I had missed tonight). Read the full post for all the details!
I'm really starting to lose enthusiasm for Community Server the more and more it becomes restricted and pricey with it's licensing model. I guess it's time to look into writing some conversion scripts from CS to DotNetNuke for Forums and Blogs, as DotNetNuke still remains a good free solution for community websites. CS seems to become more restrictive everytime the have a new release (once a year).I use CS on a few sites (http://themadblogger.org, http://stlouisinside.com, http://sccaforums.com, http://solo2.org/, http://chrishammond.com) but will seriously consider making the move to DotNetNuke based sites for those currently running CS if the Licensing stays the way it is for 2007. I had actually looked forward to doing the upgrade to 2007 for some of the sites. Open Source works -> www.dotnetnuke.com Posted from...
RSS URL

Chris Hammond

Chris Hammond

is a father, husband, leader, developer, photographer and car guy. Chris has long specialized in ASP.NET and DotNetNuke (DNN) development, so you will find a variety of posts relating to those topics. For more information check out the about Chris Hammond page.

If you are looking for DotNetNuke consulting please visit Christoc.com Software Solutions

Find me on Twitter, GitHub and LinkedIn.