extract data from serial.print
i have used basic sketch rf22 module, , can push button on server , have print specific stuff on client radio arduino. using basic sketch able serial.print incoming data, cannot figure out how capture data array control purposes.
i tried char indata[24] = { (char*)buf }; store serial data array , got
invalid conversion 'char*' 'char' error
code: [select]
uint8_t buf[rf22_max_message_len];
uint8_t len = sizeof(buf);
if (rf22.waitavailabletimeout(500))
{
// should message now
if (rf22.recv(buf, &len))
{
serial.print("got reply: ");
serial.println((char*)buf);
char indata[24] = {
(char*)buf };
}
i tried char indata[24] = { (char*)buf }; store serial data array , got
invalid conversion 'char*' 'char' error
hi.
read this page nick gammon , try understand it.
it offers multiple approaches goal.
after you're done, thank nick great , contributions community.
read this page nick gammon , try understand it.
it offers multiple approaches goal.
after you're done, thank nick great , contributions community.
Arduino Forum > Using Arduino > Programming Questions > extract data from serial.print
arduino
Comments
Post a Comment