Answer the question
In order to leave comments, you need to log in
How to merge into one value Char int Char in arduino (c++)?
there are 3 variables
char mes="message";
int point = 10; //Любое число
char ="message2";
Client.write()
size_t write(uint8_t);
size_t write(const uint8_t *buf, size_t size);
Answer the question
In order to leave comments, you need to log in
I don’t know how it is in arduins, but in normal c / c ++ you can use the following functions:
- printf
- memcpy
Haven't worked with arduinos, but in C it's usually done via structs and then passed a reference to the struct to the function. Try looking at a similar example here
If the compiler understands the asprintf function (either like cstdio (or stdio.h)) then you can glue it like this:
char *fullString;
asprintf(&fullString, "%s%d%s", msg1, number, msg2);
client.write(fullString);
formatting for this function such as in printf() and similar ones
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question