Radiopacket [20] as variable

Pro mini Rfm69hcw adafruit

char radiopacket[20] = "Hello World #"; How to make the "hello world" into a variable. Or how to include sifferent ones into an if else.

What does the [20] mean in radiopacket[20] ?

The [20] in radiopacket[20] is the size (20 values) of the array "radiopacket"

stargazer2050: What does the [20] mean in radiopacket[20] ?

The [20] means that the array radiopacket[] is being created with space for 20 chars. That actually means a max of 19 usable characters and a teminating '\0' character.

How to make the "hello world" into a variable.

The variable name is radiopacket and "hello world#" is the data. Don't get variable names and data confused.

Or how to include sifferent ones into an if else.

The various functions that you can use with cstrings (which is what radiopacket is) are in that link. strcpy() can be used to change the data in a cstring. strcmp() can be used for comparisons.

...R