title: Suggestions for programming structure and storing of animatronic sequences
body: <p>I'm working on some <a href="http://en.wikipedia.org/wiki/Animatronics" rel="nofollow">animatronics</a> for an art installation which will use several stepper motors and some high-power LEDs. In the past, when I have done this sort of thing I have used a tethered computer to handle the logic and timing. For this project, I would like to try making it self-contained (for example, just the Arduino board). For Arduino hardware, I have an <a href="http://arduino.cc/en/Main/ArduinoBoardMega" rel="nofollow">Arduino Mega</a> and could expand it with an <a href="http://en.wikipedia.org/wiki/Secure_Digital" rel="nofollow">SD card</a> <a href="http://www.arduino.cc/en/Main/ArduinoShields" rel="nofollow">shield</a> for more storage, if need be.</p>
  
  <p>I'd really welcome any ideas or suggestions on how to approach this (and am not asking for code).</p>
  
  <p>For the data, essentially I would be storing cues for each stepper and each LED. And of course I would need some kind of clock or timestamp to keep track of things.</p>
  
  <p>A stepper cue would be something like:</p>
  
  <ul>
  <li>cue start time </li>
  <li>stepper ID </li>
  <li>stepper direction </li>
  <li>stepper speed </li>
  <li>number of steps</li>
  </ul>
  
  <p>An LED cue would be something like:</p>
  
  <ul>
  <li>cue start time</li>
  <li>LED ID</li>
  <li>Start brightness</li>
  <li>End brightness</li>
  <li>duration</li>
  </ul>
  
  <p>So what I am wondering about:</p>
  
  <ul>
  <li>ideas about a data format compact enough to store lots of cues</li>
  <li>any suggestions for a clock or timestamp. (A simple counter is the obvious choice.)</li>
  </ul>
  
  <p>As for just how many cues/how much data, since I am just beginning this, I will work within whatever limits I bump up against.</p>