Print Email Facebook Twitter Programming for Interactive Prototypes Title Programming for Interactive Prototypes Author Pijnappel, P.I.R. Contributor Van Mourik, F. (mentor) Van der Helm, A.J.C. (mentor) Faculty Industrial Design Engineering Department Industrial Design Programme Master of Science Design for Interaction Date 2013-09-06 Abstract Goal In recent years, designers have increasingly started to make experiential prototypes containing electronics within the design process. This has been enabled by the rise of several microcontroller boards and software tools that decrease the complexity and cost of making such a prototype, allowing designers to construct these prototypes themselves. Although these tools have already drastically simplified the complexity of making such prototypes, it is still far from easy. It often requires substantial knowledge and experience in programming and electronics, creating a barrier for new or infrequent users and often leading to frustration. These skills also require a very logical problem solving headspace that can hinder thinking creatively about the design on a higher level. This barrier is unfortunate, as being able to properly use these tools could be very valuable to designers. This graduation project aims to design a tool to help designers make and program these kinds of prototypes more easily, quickly and fluently. Analysis After an analysis of the different prototyping platforms and programming languages available, the Arduino platform in combination with the official Arduino language was chosen as the focus for this project. A literature study on the difficulties of novices in learning to program was done, from which it was found that the most problematic part of programming for novices is structuring the program, rather than issues on the level of individual lines. From interviews with design students it was furthermore found that they have trouble adapting their program once it is written. At this point, it was also decided that it was essential for the solution to be compatible with the wealth of resources available in the Arduino community and for it not to lock users in, i.e. that the experience they gain while using it can also be used outside of the system. Exploration A tool from software engineering, the state machine, was explored and selected as a basis for the high-level structuring of the program. Using state machines and their visual representation the state transition diagram, has several advantages: they are relatively easily to learn and understand; they give a visual overview of the program, which can also be used to discuss within a design team; they provide high-level structuring that then allows the user to fill-in the separate low-level parts; they make changing the program easier; and code can be easily reused. Based on an analysis of the actual code of several designers’ finished programs, a three part approach was chosen as most appropriate for writing these: to use state machines for high-level program structuring; to provide a library of ways to achieve common functionality, called patterns, for common operations; and to rely on libraries and sample code available online for sensor and actuator code. A preliminary exploration with this approach was done by means of a paper booklet providing a step by step approach to writing a program, which included a state machine step. From tests with designers using this booklet, several problems were identified in using state machines: there is a lack of direct feedback on their diagram, which would allow them to quickly learn from mistakes and rid themselves of misconceptions; state machine operation is invisible in a normal program, potentially obscuring mistakes that are present; and they lack information about details from the eventual code that prevent them from determining how to set up the state transition diagram. Core Design A desktop application was designed with a fully working prototype, called Machino. It revolves around making an Arduino program using a state machine and seeing the state machine in action as the program is running on the Arduino. The user draws a state transition diagram and Machino then instantly generates the code for it with places where the user can implement the lower-level functionality. Highlighting provides the feedback on how the state machine is running. This helps the designer in gaining an accurate understanding of how the state machine operates. Machino helps with the structuring but leaves the code for the lower-level functionality to the user. This frees it from having to provide support for specific sensor or actuators, instead leveraging the Arduino community resources abundantly available. This design was evaluated by means of a user test. It was found that the programming pattern they needed to use posed the most difficulty and consumed the most time, due to its conceptual difficulty and non-modularity. Another important finding was that the correspondence between the diagram and the code was insufficiently clear. Final Design Based on the findings a second, for this project final, iteration was made on the design of Machino. This iteration introduced a preliminary design for a pattern library, an extension to the state machine to make it more modular, and several additional forms of highlighting to strengthen the connection between the diagram and the code. Properly designing the patterns for the pattern library is beyond the scope of this project, but a limited set were made as an initial exploration into this direction. This final design was evaluated by means of another, slightly more comprehensive user test. This test also aimed to provide some validation for using state machines in this context, independently from the Machino implementation. It was found that when properly understood state machines can indeed be a helpful tool for designers to structure their program and their thinking. Several difficulties in using the patterns provided some early guidelines for an eventual proper design of such a system. The added highlighting was largely clear and effective. Conclusion Machino presents a significant step in the right direction in terms of the original assignment. It can help designers to create and adapt their interactive prototypes more easily, quickly and fluently. This allows them to do more themselves and to adapt and refine their concept more. And hopefully, it can encourage more designers to work with these tools and unlock their full potential. Subject programmingelectronicsprototypingArduinoapp To reference this document use: uuid:81802446-1d74-4d3c-8cea-27aa5b2015fe Access restriction Campus only Part of collection Student theses Document type master thesis Rights (c) 2013 Pijnappel, P.I.R.