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.

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.


Arduino Forum > Using Arduino > Programming Questions > extract data from serial.print


arduino

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support