You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a possible workaround: String payloadAsString = ""; for (int c = 1; c < payloadLength; c++) { payloadAsString += (char)payload[c]; }
by using c=1 the initial 0x00 won't be read!
Hi. I used this example
https://github.com/don/NDEF/blob/master/examples/ReadTagExtended/ReadTagExtended.ino
to read a RFID-Tag and compare the written text with a given string. It doesn't work as expected and as far as I can tell it's because of a 0x00 that is saved with the string.
I tried this:
if (payloadAsString == Hammer) {Serial.println(" The object is a Hammer"); }
... but it fails.
This snippet seems to be the problem:
String payloadAsString = ""; for (int c = 0; c < payloadLength; c++) { payloadAsString += (char)payload[c]; }
Any hints what to change?
The text was updated successfully, but these errors were encountered: