从M24sr NFC读取arduino的标签

时间:2018-06-11 00:53:38

标签: arduino nfc

我正在开发一个访问控制项目,为此我需要在NFC上读取标签。问题是,我可以读取它的唯一地方是在串行监视器上,似乎写的命令是://readNDEFMsg //len = full NDEF length, (5 byte prefix+actual URI) Serial.println("readNDEFMsg"); Wire.beginTransmission(NFC_ADDR_7BIT); // Patch in the length and fix the broken CRC readNDEFMsg[5] = len; // this is the len returned from ReadNDEFLen ComputeCrc(readNDEFMsg, sizeof(readNDEFMsg)-2, &(readNDEFMsg[6]), &(readNDEFMsg[7])); Wire.write(readNDEFMsg, sizeof(readNDEFMsg)); Serial.write(); Wire.endTransmission(); delay(1);

但我不知道如何将该消息作为字符串捕获(对于访问控制,我将数据库中的字符串与NFC的标记进行比较,这就是我希望它作为字符串的原因。)

以下是我现在关注的一段代码:

export class EventService<T> {
    protected _eventSubject = new Subject();
    public events = this._eventSubject.asObservable();

    dispathEvent(event) {
       this._eventSubject.next(event);
    }
}

0 个答案:

没有答案