August 31, 2012

Thoughts about Arduino and Finite State Machines

 Over at the 'hacking majenko' site, Matt has articulated his thoughts on different methods of programming an Arduino. Not different as in language, different as in the algorithm created to solve the problem. In his article Matt proposes thinking about a project in the terms of a finite state machine (FSM). In doing so, this increases the structure and reduces the need to rely on if, then, else, while and the delay functions. Furthermore by thinking of your project as an FSM, it is easier to add more functionality to the code later in following updates, as you're just introducing more actions that can happen upon an event. 

 

Apart from theoretical discussion Matt has included examples of an Arduino sketch to demonstrate his points. For more information click here. And we're on twitter and Google+, so follow us for news and product updates as well.

If you're interested in more detailed and useful projects based around an Arduino board - read a copy of "Practical Arduino" by Jonathan Oxer and Hugh Blemings:


Create your own Arduino-based designs, gain an in-depth knowledge of the architecture of Arduino, and learn the easy-to-use Arduino language all in the context of practical projects that you can build yourself at home. Get hands-on experience using a variety of projects and recipes for everything from home automation to test equipment. For more information and to order, click here


Leave a comment

Comments have to be approved before showing up.