Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ginixsan/cc0463ce4b3eebabfea3b448fa47a62e to your computer and use it in GitHub Desktop.

Select an option

Save ginixsan/cc0463ce4b3eebabfea3b448fa47a62e to your computer and use it in GitHub Desktop.
arduino convert string to/from byte array
void setup(void)
{
}
void loop(void)
{
byte byteArray[5];
strcpy((char *)byteArray,"0123"); //init byte array, index 5 = \0
String myString = String((char *)byteArray);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment