Reading RDIF, GoBetwino to safe in Excel

For a project I have to read RFID chips, therefore I have a program that constantly searches for RFID tags and gives me the EPC number. I only want to save this data in Excel, which is done by the second program, which can save data with a time stamp in Excel via GoBetwino. At first, the attached file can only do this with random varbials. Now my question, can someone help me to connect the two programs on this basis, so that the EPCs are constantly read out and stored in Excel via GoBetwino at the same time?
I am very grateful for any help!

EPCVerusch3.ino (4.05 KB)

gobetwinoLogTest.ino (1.87 KB)

      byte tagEPCBytes = nano.getTagEPCBytes(); //Get the number of bytes of EPC from response

The comment gives you a clue that the name of the variable is garbage.

   byte byteCount = nano.getTagEPCBytes(); //Get the number of bytes
      //Print EPC bytes, this is a subsection of bytes from the response/msg array
      Serial.print(F(" epc["));
      for (byte x = 0 ; x < tagEPCBytes ; x++)
      {
        if (nano.msg[31 + x] < 0x10) Serial.print(F("0")); //Pretty print
        Serial.print(nano.msg[31 + x], HEX);
        Serial.print(F(" "));
      }
      Serial.print(F("]"));

      Serial.println();

YOU need to understand what every one of these print() calls is doing.

Comment them out one at a time, and observe the differences in the output to the Serial Monitor. When you KNOW which ones output data that you want in Excel, you will be well positioned to get rid of the other ones.

   Serial.print("#S|LOGTEST|[");
   Serial.print(itoa((value1), buffer, 10));
   Serial.print(";");
   Serial.print(itoa((value2), buffer, 10));
   Serial.print(";");
   Serial.print(itoa((value3), buffer, 10));
   Serial.println("]#");

Do you understand what each of these lines is doing? Without starting GoBetwino, just open the Serial Monitor application, and see what you get.

Google itoa(), if you need to, to see what it is doing, and what it returns.

You'll see that it converts the int to a string, which is a useless thing to do because print() knows how to do that.

So, that code really could be a lot simpler.

   Serial.print("#S|LOGTEST|[");
   Serial.print(value1);
   Serial.print(";");
   Serial.print(value2);
   Serial.print(";");
   Serial.print(value3);
   Serial.println("]#");

If you read the GoBetweenino documentation, you'll know that commands to GoBetweenino are indicated by a # followed by some letter with additional stuff after the letter that depend on the letter.

What that is doing is telling GoBetweenino to open a file and write semi-colon separated values to it.

Experiment with changing the number of print() statements between the first and last one, to see how many columns you get in the file.

When you understand what the lines between the first and last one do, you'll easily be able to change them to transfer the bytes from your RFID reader, instead of hardcoded, or random, values.

Thank you for your detailed answer!

However, my problem is that I don't really understand what the individual lines mean and what they do. This is the first time that I have to work with an Arduino, which is why I am overwhelmed with it and I don't really understand how to proceed with your instructions

However, my problem is that I don't really understand what the individual lines mean and what they do.

In the 14 minutes since I've posted, just how much effort have you expended learning what they mean?

Click the report to moderator link in any post in this thread, and ask that this be moved to Gigs and Collaboration. Add a reply that indicates how much you'll pay for someone to write the code for you.

If its an enticing enough value, I'll overlook the fact that you are not interested in learning anything.

I won't pay anyone to write me a program! And I´m more ready to learn the whole thing, but I also need someone to explain it to me. What you could do instead of whining at me for not being willing to learn

What you could do instead of whining at me for not being willing to learn

I've already suggested that you could send the data, with no changes, the serial monitor, and see what gets printed. Then, comment out one statement at a time, and observe the changes.

You've clearly rejected that, as it requires some effort on your part.

It doesn't even require a significant level of effort to determine what each of the lines is doing. This one, for instance:

      Serial.print(F(" epc["));

Not rocket science to see that this makes epc[ appear on the serial monitor.

Explaining WHY you want to do that does require a bit of effort, but, since it is your code, you have to make that effort.

        if (nano.msg[31 + x] < 0x10) Serial.print(F("0")); //Pretty print

If the value is less than 16, print a leading 0, so you get 0F instead of F. Was that so hard to suss out?

        Serial.print(nano.msg[31 + x], HEX);

Print the F part of 0F. Not THAT hard to figure this out...

Now, what, EXACTLY, do you want in your Excel spread sheet? I'm sure someone else will help you with the Serial.print() statements to make that happen. It won't be me, though. I'm done with you.

I'm starting to understand what all this means and the communication between the gobetwino and the RFID reader is already working. However, you can only save variable in string form via gobetwino in Excel. Since an EPC number is not read out in the string form, I'm stuck at this point right now. Maybe you got a little hint for that. And yes I do know that itoa() is supposted to convert an integer and return in as string representation

And that is exactly what I need to do, read the EPC number an store it in Excel.

Since an EPC number is not read out in the string form

Those Serial.print() statements, as a whole, DO print the EPC number AS A STRING.