'Writing an NDEF message with other code in Arduino
Has anyone worked with the PN532 library on Arduino? currently running a program that reads Analog values from an amplifier and sends updated values to an NFC card.
Here's the code we have now:
Serial.println("\nPlace a formatted Mifare Classic or Ultralight NFC tag on the reader.");
if (nfc.tagPresent()) {
NdefMessage message = NdefMessage();
Serial.println(weight);
message.addUriRecord(weight);
bool success = nfc.write(message);
if (success) {
Serial.println("Success. Try reading this tag with your phone.");
} else {
Serial.println("Write failed.");
}
}
delay(50000);
Where 'weight' is the String value we get after pulling and calculating from the digital I/O pins. Was just wondering if anyone was familiar with using this with Arduino and other components in one file?
We're currently able to run the whole program that gets weight values from an amplifier, but whenever we reach the "success. Try reading this tag with your phone" step and try reading the tag, no message appears on the card. Very confusing!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
