char str5[] = {str0, "?ad1=", reada[0], "&ad2=", reada[1]} is an array of 4 chars. your output is 4 chars. everything is ok.
unless you need an array of 4 strings.
a constant string is const char* str0 ="216.245.193.741/rick/push.asp"
an array of constant strings is const char* str5[] = {str0, "?ad1=", "abcd", "&ad2=", "xyz"}
println can't print an array of strings. you can use sprintf to create formatted strings
Thanks, useful info for serial println. I am concerned that the function client.get() needs one big string thus the reason trying ways to construct it.
I need to end up with
"216.245.193.741/rick/push.asp?ad1=var1&ad2=var2&ad3=var3&ad4=var4";
There is no client.get() function. There is a client.print() function that can print a GET request to a server. It makes some, but not much, difference if you use
Ok - so the 'client' object does the job of pulling apart your URL.
What you want to do then is create an empty array of char[] that will be big enough to hold your URI, initialize element zero to '\0' (to turn it into a zero-lengh string), and then use the libc string functions to append the bits of your URI into that buffer.
Juraj:
PaulMurrayCbr, why so complicated string concatenation?
It isn't complicated.
Robin2:
Why on earth are you trying to formulate a GET string on the Arduino side of a Yun when you have all that Linux computing power on the same board?
Very good point.
A small shell script that takes some parameters would be much easier to do.