Communication between .ino and .cpp with functions [SOLVED]


i using library "rfid-master" miguelbalboa on github, contains file mfrc522.cpp.  my sketch calls function within file, picc_dumptoserial(/*arguments*/), calls picc_dumpmifareclassictoserial(/*arguments*/), calls picc_dumpmifareclassicsectortoserial(/*arguments*/) have modified code copy existing buffer (byte buffer[18];) new variable instead of posting serial monitor.  i need variable's value sent sketch converting integer value , sending servo.

i've never been exceptionally @ understanding/remembering how send values between functions, across files.  normally i'd set function have return type , call function receive resulting value, functions declared void , i'd rather not change unless know i'm doing.  i'm assuming can send value using arguments, comes use of addresses , pointers, main weakness (especially since i'm not used using byte variable type).

any assistance/guidance appreciated.  (i need convert received value integer, copying on string , typecasting integer...unless knows how more efficiently lol)

thanks!

image attached give visual outline of situation.

u might try this--

void  picc_dumptoserial(/*arguments*/)


change to:

int  picc_dumptoserial(/*arguments*/)

 

then make ur int conversion in function , return value




Arduino Forum > Using Arduino > Programming Questions > Communication between .ino and .cpp with functions [SOLVED]


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'