Pages

Labels

Showing posts with label platform. Show all posts
Showing posts with label platform. Show all posts

Tuesday, 18 February 2014

Coding the Arduino in C++ - The reasons behind my decision.

By default most people will code their Arduino boards using the Arduino Studio, which means writing code in a variation of C. Personally I don't have a problem with that, for most developers using this board it's perfectly fine, it's just that I want to do so much more than I can easily achieve with C. Therefore I'll be developing in C++, and will starting with this post describe the decisions, options and then steps I am taking to achieve this.

Firstly I feel I must explain what it is that I want to achieve that the variation of C that is used in Arduino Studio, either doesn't provide me with, or is not as straight forward as I feel it ought to be.

Firstly I am working in a truly agile development environment, and a key to agile development is Test Driven Development (TDD). Now I am aware that there are TDD boiler plates out there that can be used in Arduino Studio, the arduino_c_scaffold git repository created by the throwtheswitch.org guys looks a really good place to start, however I am looking for something with a little more support behind it, and Google Test (gtest) feels a better solution.

Going hand in hand with the unit testing framework, is object mocking, important because if you aren't mocking, faking, or otherwise separating code that you are testing from any dependencies that code is using, you are not doing unit testing, which in itself breaks a core part of TDD. The throwtheswitch guys do have this covered too in their product cmock, and I would fully recommend checking what these guys are up to, as for most this really can be seen as a solution to the TDD problem, but again what I am looking for is a framework that is more widely used and gtest sister product Google Mock (gmock) is the framework that I prefer to use.

Beyond TDD, there are other reasons for choosing to go down the C++ route, not least because we are anticipating having to incorporate hardware that is not currently available in pre-built Arduino shields. If you are building new hardware, or providing libraries of code that other developers will use on Arduino, these are typically written as C++ libraries, so the fact that we are expecting to be writing C++ for these libraries, and the unit tests, it seems sensible to write all the code in C++.

So those are the reasons behind my decision to code in C++, next I will select the development environment, and describe setting up the automated build system we use, Teamcity, to build, test, and deploy these projects.




Saturday, 25 January 2014

My hardy friend.

What is Arduino

Before heading full speed into the first of many posts about building the prototype, I thought I ought to introduce what will make all this possible, the Arduino. {For those interested in the entomology of the word, it's an Italian boys name, and means hardy friend, hence the name of the blog}.

The Arduino micro-controller board is today 'de facto' tool for prototyping smart gadgets, and can lay claim to being the platform used to develop some of the hottest gadgets around. From the Pebble watch to the Fitbit, a lot of today's tech either owes it's origins to the Arduino, in the case of the Pebble, or continue to owe it evolution to this device, as is the case with Fitbit which still uses Arduino's for rapid prototyping.

But what are the origins of this amazing device?

The original Arduino was released in 2005 Massimo Banzi, who design the board as a tool for his students to use, Massimo named the device in honor of the 'Bar di Re Arduino', a favourite drinking establishment of his in the northern Italian town of Ivrea.

The fact he came up with the device in the first place is very much a result of shrinking budgets, and reduced time teaching the students. Both of these, plus the changing requirements of courses teaching interactive electronics design, meant that the micro-controller that the academic world had been using for decades was no longer suitable for his requirements.

What he wanted was a cheaper, more powerful, and more flexible micro-controller that his students could use as the core of their development projects.

With strong beliefs in the open-source community, Massimo had sort to open the project to as many people as possible, and when it was announced that the course which he was teaching was going to be closed down, he decided that the whole thing should be made open-source.

What he did not expect to happen was that this device has since it's release revolutionise DIY electronics world wide, with a number of companies selling controllers based upon the platform he came up with. Today the basic board is cheaper than ever, and advances in electronic design and manufacturing mean smaller and smaller devices are becoming available.

And as for the pub that gave the device it's name, well fans of the device travel from all over the world to in the pub, the only problem is no one working in the bar knows what an Arduino is.
  

Introduction

Like anybody with an interest in technology, I have always felt that I have an amazing application or gadget somewhere inside of my mind, but up until now I have been unsure what it is. But over the last couple of days that has changed, I think I have found one and would like to share with you the processes I go through in making this idea a reality.

I won't say what the idea is at the moment, I don't want to have somebody else take it and build it before I had a shot at doing it myself, but over the months ahead I will document the various stages that I go through to product a proof of concept, and if it progresses further, how I take that concept and produce a product from it.

What I am prepared to disclose at this point, is that at the core of this idea is an innovative hardware platform. In order to make a proof of concept possible I will be building it on the Arduino micro-controller, more about this in the next posting, and during the process of building the concept will be discovering lots of useful information about this device, which I will share here.

I encourage anybody reading this blog that has any constructive input into this process, please feel free to leave any comment that you have so that not only do I learn from it, but hopefully others that discover this blog will learn too.

 
 
Blogger Templates ReadABlog.com