   pinMode(control3, OUTPUT); 
   
   Serial.println("Started serial");
+  init_stuff();
+}
+
+void loop() {
+  while (Serial.available() > 0){
+    listenForRequest();
+  }
   
 }
 

//All code is using variables, which can change
//Figure out how data for magnetometers have to be handled (photodiodes and temp are just default


int select = 1;  //value from 0 to 15, telling which line on the MUX to select and in this form to easily convert to binary that's need for control lines 

int control0 = 2;
int control1 = 3;
int control2 = 4;
int control3 = 5;
char req;
boolean requestData;

void setup() {
  Serial.begin(9600);

    getRequest();
  }else if (req == 'p'){
    postRequest();
  }
}

