concatenate ints with cons chars


hi

i trying print following on 1 line
code: [select]
serial.println(',,' += mapped_aux1 += '/' += mapped_aux3 += '/' += mapped_gear += '/' += mapped_flaps += '/' += wf_c += '/' += wf_wl += '/' += wf_fuf += '/' += lg_ud += '/' += lg_doors += '/' += lg_bof += '/' += cf_pos += '/' += cf_am += '/' += e_temp += '/' += e_choke += '/' += e_imomb += '/' += e_starter += '/' += c_oc += ',');

mapped_aux1, etc integers.

however following error when compiling,
serial_coms:159: error: lvalue required left operand of assignment

if use "/" instead of '/' following,
serial_coms:159: error: invalid conversion 'const char*' 'int'
serial_coms:159: error: assignment of read-only location '",,"'

i know can using
code: [select]
serial.print(",,");
    serial.print(mapped_aux1);
    serial.print("/");

etc, serial.println @ end. 
however can cause problems vb program creating arduino communicating if arduino starts printing half way down line when port first opened.

any or ideas appreciated.
thanx

some research on sprintf() and/or snprintf() functions pay dividends you.


Arduino Forum > Using Arduino > Interfacing w/ Software on the Computer > concatenate ints with cons chars


arduino

Comments

Popular posts from this blog

How do I add a forum to my site? - Joomla! Forum - community, help and support

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

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