Tag Archives: .NET Micro Framework

Free Webcast: Getting Started with Netduino

This Friday, April 13, 2012 at 10am PT / 1pm ET, Chris Walker from Secret Labs LLC will be doing a free 1 hour webcast hosted by O’Reily Media titled Getting Started with Netduino.

Start building electronics projects with Netduino, the popular open source hardware platform that’s captured the imagination of makers and hobbyists worldwide. Join Chris Walker, inventor of the Netduino and author of Getting Started with Netduino for an exciting webcast presentation where he will provide an overview of projects you can create with Netduino as well as what you need to experiment with Netduino and the .NET Micro Framework.

If you haven’t heard Chris speak before, be prepared for an energetic presentation covering anything you could want to know about taking the leap into embedded programming using the .NET Micro Framework and Visual Studio. If it’s been on your mind or you’re just curious this shouldn’t be missed!

Update: The recorded Getting Started with Netduino session is now available.

Happy Listening,

MicroLinq NotifyingCollection Published

I’ve been pondering if/how to implement an Observable Collection type class in the MicroLinq project for NETMF. Tonight I finally set about doing it.

I started with the ValueTypeArrayList class, removed the type restriction and switched storage to just plain old object[]. I took a look at the current ObservableCollection in the full framework and set about deciding what was a must-have and what could be tossed away to save memory and footprint.

It was obvious the CollectionChanged event was necessary but I threw away the PropertyChanged event. It just didn’t seem to provide anything useful in this case. So, concentrating just on the CollectionChanged event, I looked at the EventArgs and saw a lot of code which basically provides a read-only copy of the old and/or new collection (before the modification and after) depending on the change type. I cut this first because I just couldn’t justify the memory usage.

That left only the Action type of which there are 5 in the full framework. Only 3 could ever be reported from my implementation so I cut the other two leaving just Add, Remove and Reset. I kept the class and interface names the same as the full framework in case there’s ever a native implementation. It should be trivial to port code that makes use of NotifyingCollection now this way.

Continue reading

New MicroLinq Build! Is it Release Candidate yet?

I just published another release of the MicroLinq project tonight. It contains a number of fixes, enhancements and some new stuff!

No changes in this release.

-Modified some overloads to use less code by relying on the full version classes.
-New OrderBy implementation. Doesn’t modify source and only iterates source once to copy the values. Uses MergeSort now.

-Removed project dependency on MicroLinq which wasn’t needed.
-Fixed bug that could have passed the wrong object to the action delegate while enumerating.
-Removed Countdown and Countup classes and replaced with in-place ManualResetEvent.
-Added optional timeout parameter to specify how long to wait. The success/failure is still not bubbled up though.
-Library is a bit smaller now.

-New project. Provides commonly-used delegates for Aggregate and Compare delegates. Could be expanded if others suggest helpful versions. Inspired by comments from Corey Kosak.
-Builds to its own library to conserve program space if not wanted/used in a project.

First Accolade for MicroLinq




New MicroLinq Build Released Today

I just posted a new MicroLinq build. I’d like to call it a release candidate but I haven’t put in enough testing or gotten enough response on the project yet. I did get a thorough review from Corey Kosak on the Netduino Forums and I’ve implemented most of his recommendations.

This release features significant performance increases in the OrderBy extension by switching from bubble sort to quick sort. In addition there is an extra overload which allows a Comparer delegate to be passed. This will perform much better when the objects to be compared are not marked as IComparable. Objects which have no public way to compare can also be sorted by passing in a Comparer delegate.

The NearlyGenericArrayList and ParallelForEach remain in their own projects in the solution and build to their own libraries. These are more for my own experimentation that I don’t mind others seeing than to be seriously considered. The NGAL might disappear altogether now that the OrderBy extension is implemented and became more versatile than having a specific Sort method.

Overall this build should be the most efficient and stable version released. I use it in its current form tinkering around on my Netduino board.

Please check it out if you’re doing any .NET Micro Framework projects and let me know how it’s performing!


My Second CodePlex Project: MicroLinq

I decided to bite the bullet and just upload my source code to CodePlex. I created a new project called MicroLinq. Even if it does end up being a shell of a project, if at least 1 other person finds it useful then it was worth the effort.

The project is pretty sparse at the moment. I’ll add to the documentation as time goes on. For now you can browse the code through the web and most of the Linq extensions are commented. There’s also other code which might be interesting to browse.

I’ve created a release of the initial compiled code and put it in the downloads section. The ZIP file contains Debug and Release builds for the three projects in both Big Endian and Little Endian flavors.

The source files build against .NET Micro Framework 4.1 and the project format is Visual Studio 2010.

I would prefer comments, feedback and issues be posted directly to the CodePlex project and not in the blog. This way the information will be consolidated and easily viewable by anyone interested in the project.

I hope it’s useful!

Netduino and .NET Micro Framework (NETMF)

Early Arduino Experimentation

I recently purchased a few things from the MakerShed which included an Arduino and a Netduio Plus. I spent a couple weekends playing around with the Arduino first because I’m mostly a Mac guy at home and the code editor was available for Mac. I was up and running in under a couple minutes.

My first impression was that it was a lot like working with the BASIC stamps I had used for years except with the tremendous benefit of there being a Mini USB port right on the chip. (I bought the Nano which is just the brains without the shield-breakout. It’s the same form factor as a stamp and can be placed on a breadboard.)

The programming was shockingly similar except it used a variation of C instead of BASIC. The rest was about the same. In under an hour I had a Parallax RFID reader connected on a mini breadboard, troubleshot my first problem (you can’t program the Nano while the RFID reader is wired into the Rx pin!) and had my first project.

My observations were that the code editor, while designed to make it easy for people to stitch together lines of code to get something working, made it too easy to just stitch together lines of code without doing proper encapsulation or object oriented programming. Stepping back this trait seems endemic in the hobby hardware and microcontroller areas. As a software guy myself I can’t help but cringe and I immediately started trying to figure out how to build my own classes.

And that’s when I remembered I haven’t used C in a long, long time. Using impending deadlines as an excuse, I broke off my endeavors with the Arduino and let everything sit for a couple days.

Picking Up the Netduino

A few days later I saw an announcement from MakerShed that SparkFun and Instructables had teamed up and were hosting a microcontroller contest. Any project using a microcontroller was eligible for entry. Just make a project, post an instructable and open source your code. It was a simple gimmick but it got me to pull out the Netduino and have a crack at it.

Continue reading