 float scale(int16_t value, float scale_factor) {
   return value / scale_factor;
 }
+
+void statusLight(bool state) {
+  digitalWrite(GREEN_LED, state ? HIGH : LOW);
+  digitalWrite(RED_LED, state ? LOW : HIGH);
+}

  Serial.print("\t");
  Serial.print(scale(gz, GYRO_SCALE));
  Serial.print("\t");
  
  // TODO: complete this.
  // write raw magnetometer values (??)
  Serial.print(mx);

}

void loop() {
  // Indicate we're up and running.
  statusLight(1);

  int16_t ax, ay, az;  // g forces
  int16_t gx, gy, gz;  // degrees/second
  int16_t mx, my, mz;  // TODO: learn wtf data this is.
