           }
         }
       }
-      
     }
 
   }   /** end code that only runs if !stopped **/


#include <Arduino.h>
#include <IRLib.h>
#include <Wire.h>
#include <Adafruit_MMA8451.h>
#include <Adafruit_Sensor.h>

#include "Accelerometer.h"
#include "Relay.h"
#include "Lights.h"
#include "RemoteControl.h"

static Relay * r0 = 0;
static Relay * r1 = 0;
static Lights * lights = 0;
static RemoteControl * remote = 0;
static Accelerometer * accelerometer = 0;

void relay_setup();

boolean stopped = 0;

#define LED 13
#define RELAY_0_PIN 10
#define RELAY_1_PIN 9

}

void loop() {
  
  accelerometer->loop();
  // accelerometer->log();

  remote->loop();

  // indicates whether we should clear last command
  // boolean clearLastCommand = true;

  // Process remote command:

  if ( remote->last_command == RemoteCommandStop ) {
    
    stopped = 1;
