     
     if (inputString[inputString.length()-1] == ']') {
       analogWrite(motorPin, 255);
-      delay(500);
-      analogWrite(motorPin, 0);
+      time = millis();
     }
     
     if (inputString[inputString.length()-1] == ')') {

String inputString = "";
boolean stringComplete = false;
boolean USB_connected = false;

void setup() {
  //set pins to output so you can control the shift register

int dataPin = 4;

int motorPin = 5;
long motor_time = 500; //number of milliseconds the motor vibrates

int redLED = 9; //pwm
int blueLED = 10; //pwm
int greenLED = 11; //pwm
