 
 SoftwareSerial xbeeSerial(8, 9); // RX, TX
 Process curl;
+
+int requested[] = {0, 0, 0, 0, 0};
+String requests = "htlar";
+
+int ndx = 0;
 
 void setup() {
 	Bridge.begin();

	xbeeSerial.println(value);
}

void request(char type) {
	Console.print("Request: ");Console.println(type);
	while (xbeeSerial.available()) xbeeSerial.read();

	xbeeSerial.print(type);
	int x = 0;
	while (!xbeeSerial.available() && x < 10) {
		x++;
		delay(100);
	}
	recvWithEndMarker();
	sendData();
}

void sendData() {
	if (newData == true) {
		Console.print("This just in ... ");
		Console.println(receivedChars);
		postData(receivedChars);
		newData = false;
	}
}

void recvWithEndMarker() {
	static byte ndx = 0;
	char endMarker = '\n';
	char rc;

	while (xbeeSerial.available() > 0 && newData == false) {
		rc = xbeeSerial.read();

		if (rc != endMarker) {
			receivedChars[ndx] = rc;
			ndx++;
			if (ndx >= numChars) {
				ndx = numChars - 1;
			}
		}
		else {
			receivedChars[ndx] = '\0'; // terminate the string
			ndx = 0;
			newData = true;
		}
	}
}

void postData(const char* data) {

}

void loop() {
	for (int i = 0; i < requests.length(); i++) {
		request(requests.charAt(i));
		while(processResponse());
	}

	for (int i = 0; i < 10000; i++)
		processResponse();
}

void set(char type, char value) {
