 };
 
 // active frequencies (by drive):
-byte frequencies[] = {
+int frequencies[] = {
   0
 };
 

#include <TimerOne.h>

// timing loop resolution (microseconds):
const byte LOOP_RESOLUTION = 50000;

// head position range
const byte HEAD_MIN = 0;
const byte HEAD_MAX = 150;

// number of drives
const byte DRIVE_COUNT = 1;

// starting step control pin
// when looping, we assume step control pins occur every two pins
const byte STARTING_PIN = 2;

// head directions (by drive):
byte directions[] = {


// elapsed ticks (by drive):
// used to know when to step
int ticks[] = {
  0
};

void setup() {
  // set all needed pin modes
  pinMode(2, OUTPUT); // 0: step control
  pinMode(3, OUTPUT); // 0: direction

  // set the drives to starting position if they aren't already
  resetDrives();
  delay(2000);

  // initialize the timing loop
  Timer1.initialize(LOOP_RESOLUTION);
  Timer1.attachInterrupt(tick);

  // initialize serial interface
  Serial.begin(9600);
}

void loop() {
  // everything is done within the tick!
}

// @todo this totally doesn't work... the commented stuff is what the final
// working result should eventually look like
void tick() {
  step(0);

