     delay(2000);
     Serial.println("DATA WAS AVAILABLE!");
     Serial.flush();
-    bool wasSuccessful = pseudopod->readMessage();
-    Serial.print("Was the topic successful?: ");
-    Serial.println(wasSuccessful);
+    TentacleMessage message = pseudopod.getMessage(conn);
+    Serial.print("How many pins did we get?");
+    Serial.println(message.getPins().size());
   }
 }
 

#include "pb_arduino_encode.h"
#include "pb_arduino_decode.h"

#include "MemoryFree.h"

#include "tentacle.h"
#include "tentacle-arduino.h"
#include "tentacle-pseudopod.h"

#include "BufferStream.hpp"
#include "Arduino.h"
#include <string>
#include <EEPROM.h>
#include "EEPROMAnything.h"

Pseudopod *pseudopod;
TentacleArduino  tentacle;




void sendData() {
  //tentacle.getConfig()[2].action = Pin::digitalRead;
  int written = pseudopod.sendPins( tentacle.getValue(), conn );
  Serial.print(written);
  Serial.println(" bytes written.");
  Serial.print(freeRam());
  Serial.println(" bytes free");
  Serial.flush();
