 	delay(1000);
 	request('a');
 	delay(1000);
+	getData();
+	set('b', block);
+	setLockState(block == '1');
+}
+
+void set(char type, char value) {
+	xbeeSerial.print(type);
+	xbeeSerial.println(value);
 }
 
 void request(char type) {

	curl.runAsynchronously();
}


#include <Console.h>

#define SERVER_URI "http://192.168.1.147:5000/laundrydude/api/data"
#define BLOCKER_STATE_URI "http://192.168.1.147:5000/laundrydude/api/blocker"

const byte numChars = 32;
char receivedChars[numChars];		// an array to store the received data
bool newData = false;
char block = false;

SoftwareSerial xbeeSerial(8, 9); // RX, TX
Process curl;
