Assignment 2: State Machines and Interrupts

Assignment 2: State Machines and Interrupts

Due 23:59, 29 January 2018.  We will discuss in class on the 30th and suggest improvements or analyze different ways to resolve your problem.

Requirements

State a question or process you would like to solve. (Ex: “control the lights in a room based on a door being opened and curtains being opened or closed.”)  Create a physical interaction using a state machine driven by inputs and interrupts that collects data, interprets the data, then displays a result via console, LEDs, or other output devices. Speakers are acceptable but must be executed in a useful manner, kinematic solutions are also welcome.

The state machine should have at least three states not including on and off states.  Declare whether your states have an order or if any state can transition to another state.

Post a short video showing the various states, I suggest vimeo or youtube.   For your Arduino and Fritzing sketches, make a zip file or gzip/tar bundled and post that to the blog.

Class Notes, 23 Jan 2018

First off, if you’re on a Mac and seeing the error about “Disk Not Ejected Properly”, I posted a fix for this last Fall.

Second, the problem I had with my Metro was apparently a short.  When I got back to my studio I took out all the components and my Metro worked fine.  I replaced the components one by one, doing a new build and upload on each component.  By the time I was finished, it all worked correctly.

Magic.

Interrupts

Interrupts are a part of our daily life.  The best example is a door bell.  You have two options:

1) Go to the door once a minute and see if anyone is there.

2) Install a door bell.  When someone comes to the door they push the bell and you are notified.  You can choose whether or not to respond to the door bell.

Almost every input to a computing device is based on interrupts:

  • buttons on your mobile
  • game controllers
  • controls on a microwave or stove

Take a look at the attached Arduino and Fritzing sketches.  We will continue to discuss interrupts as well as state machines on Thursday.  I’ll email the reading assignment in a few, please read it and be prepared for a short discussion on potential interaction methods.

class-3 updated 25 Jan with more examples of interrupts

Assignment 1: Basic Stats

Assignment 1: Basic Stats

Post Arduino sketch + Fritzing diagram to the blog by 23:59 Monday, 22 Jan 18.  No video or photos are needed, we’ll look at the sketches during the start of class.

Using two different analog sensors, read values and report on statistics. Do this over time, showing how collecting more analogRead() data in an array allows you to better refine the results for these operations
– mean
– median
– range, min and max values
– outlier (bonus points)
– standard deviation (bonus points)
– change sensor reading rate and sample size to change the interaction
More Bonus points! How can you take these results then modify your sketch to improve the results when it’s moved from one room to another? How can I decide between A10 or my house?

Introductions and First Assignment

Introduction

Class Theme – Improving Life

How can we improve someone’s life by making their physical environment interactive and responsive?

  • Assisted
  • Enhanced
  • Improved
  • Qualified
  • Sensed

Syllabus is posted, please ask if you have any questions or concerns.

The class blog from 2008 that we skimmed in class.

Last year’s class blog that we can review in class Thursday if there is interest.

A guide to the materials on the walls of A10.

Assignment

For the reading assignment, please read Tom Igoe’s “Physical Computing’s Greatest Hits (and Misses)“.  I use this as a guide for what projects I’ll accept in this class, we’ll discuss it briefly at the start of class on Thursday.