Created
March 27, 2019 12:44
-
-
Save nebulak/63038441dbce9ff8fb6afb779090cece to your computer and use it in GitHub Desktop.
arduino convert string to/from byte array
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
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