Created
April 27, 2013 15:27
-
-
Save patriciogonzalezvivo/5473487 to your computer and use it in GitHub Desktop.
Getting strings from ofSerial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string serialIn; | |
unsigned char buffer[1]; | |
while( readBytes( buffer, 1) > 0){ | |
if (buffer[0] == '\n'){ | |
break; | |
} | |
serialIn.push_back(buffer[0]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment