   Serial.println(output_buffer);
 }
 
+/**
+ * Copies a JSON string token into a provided char* buffer.
+ */
+jsmnerr_t json_string(const jsmntok_t &token, const char *json_str, char *output_str, size_t output_len)
+{
+  if (token.type != JSMN_STRING) return JSMN_ERROR_INVAL;
+  
+  size_t len = min(token.end - token.start, output_len - 1);
+  strncpy(output_str, &json_str[token.start], len);
+  output_str[len] = '\0';
+  
+  return JSMN_SUCCESS;
+}
+
+/**
+ * Extracts a floating point value from a JSON token.
+ */
+jsmnerr_t json_float(const jsmntok_t &token, const char *json_str, float &output_float)
+{
+  if (token.type != JSMN_PRIMITIVE) return JSMN_ERROR_INVAL;
+  
+  const size_t len = token.end - token.start;
+  char float_buffer[len];
+  strncpy(float_buffer, &json_str[token.start], len);
+  float_buffer[len] = '\0';
+  
+  output_float = atof(float_buffer);
+  return JSMN_SUCCESS;
+}
+
 void setup() 
 {
   // Initialize debugging serial console.

    return;
  }
  
  // TODO: read these inputs and do things.
  
  // Send back response.
  //adk.write(bytes_read, input_buffer);

platypus::LED rgb_led;
platypus::VaporPro motor(0);

/**
 * Returns a JSON error message to the connected USB device and the
 * serial debugging console.
 */
void reportJsonError(jsmnerr_t error)
{
  char *error_message;
  
  // Fill in the appropriate JSON error description.
  switch(error) {
    case JSMN_SUCCESS:
      // If we were successful, there is nothing to report.
      return;
    case JSMN_ERROR_NOMEM:
      error_message = "Insufficient memory.";
      break;
