Skip to content

Instantly share code, notes, and snippets.

@jvcleave
Created September 1, 2012 04:39
Show Gist options
  • Select an option

  • Save jvcleave/3563952 to your computer and use it in GitHub Desktop.

Select an option

Save jvcleave/3563952 to your computer and use it in GitHub Desktop.
string input for ofSerial.writeBytes
//from https://github.com/openframeworks/openFrameworks/issues/279
string msg = "some serial message";
unsigned char* msguc = new unsigned char[msg.size()];
memcpy(msguc, msg.c_str(), msg.size());
serialObject.writeBytes(msguc, msg.size());
delete [] msguc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment