Sharpduino Library: Reboot

A little background (Yes you can skip this)

A few years ago I bought an arduino to ease myself into electronic project prototyping. I tried a couple of times with pic microcontrollers, but the promise of using USB to program and debug an electronics board was too good to pass. The arduino, as everyone knows by now, is very easy to use and I had no problem creating from the simplest programs, to more complicated ones.

My goal was to create a program that would communicate with the pc and offer functionality equivalent to USB data acquisition modules from NI that we were using in our laboratory. Although the capabilities of the Arduino weren’t an exact match, the price (about 1/10th) was right. One of the requirements that I had, was that I could use this from the Labview environment. Back then there was no library for arduino for labview so I had to make one. There were actually two ways to accomplish such a task. A full native Labview library or a .net library that could be imported to Labview and used.

Given my background on .net technologies I went for the second solution. This was the birth of the Sharpduino Library. It was based on the Firmata protocol and implemented some basic functionality (Analog Input/Output, Digital Input, Digital Output). It had the functionality that I wanted, so I put it on google code and never really updated it since. I had even forgot that I had written it…

Fast forward to December 2011. I received two emails from people who had seen my library and were interested in the Firmata protocol. One was Noriaki Mitsunaga who not only used the library, but also had made a more complete implementation of the Firmata protocol. You can find his useful applications using this library here. The other was my friend Anton Smirnov who was making an equivalent library in pure Java (find his library here). It rekindled my interest in the library and I decided to do some coding.

The first step was to integrate Noriaki’s work (with his permission) and make it available. This begun with the switch of the repository from svn to mercurial. I have become a huge fan of DVCS and have found that it suits my any style of development if you spend a little time to make the switch from server-based systems. You can find the current code from the source tab of the sharpduino page.

Then I started refactoring a lot of the code, so it would make more sense. At some point I decided that the library needed a more thorough refresh,hence the reboot of the project.


For this new implementation I have decided to make a library that will be useful to two kinds of consumers. There will be a higher level API that will be useful to people in need of the previously available functionality. For example, using the ArduinoUno will be as easy as:

Of course the actual names might change, but the general direction will be this.

What is more interesting (for me) is the lower level API. It will be mostly Message Handlers, Message Senders, Messages and a few base classes to coordinate all these. The previously mentioned implementation will be based on this and will serve as an example on how to put things together to make other Firmata Implementations.

Keep an eye on this blog and/or the sharpduino page for more updates as the new implementation matures and I will have a few things to share.

PS. I would also like to mention that my goal is to create a nuget-distributable library.


Hello Blog

This is my opening blog post. Hopefully it is not going to be the last one. Through this blog I will try to give some insights to people about software, software engineering, hardware and pretty much everything that comes up in my work/life.

A few things about me first. I am an Electrical Engineer with an Msc in Nanosciences & Nanotechnologies who is currently working towards his PhD in Chemical Engineering. My interests revolve around software development, web development and electronics engineering. I am also a tech enthusiast and a new father. It is quite a mix, but it keeps me occupied and hopefully will give me something to write about.

I will try to put out things that baffled me, and their solution, so others (and probably me in the future) do not have to go through this again.