Forked from nebulak/arduino_byte_array_to_string.cpp
Created
February 3, 2023 18:29
-
-
Save ginixsan/cc0463ce4b3eebabfea3b448fa47a62e to your computer and use it in GitHub Desktop.
arduino convert string to/from byte array
This file contains hidden or 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