Closed trineon89 closed 5 years ago
push
I have a very dirty workaround for you. For me the compilation works with that, but I don't need this method so I don't care if it still works as expected or not.
In the SparkFun_UHF_RFID_Reader.cpp
file add a line to the writeTagEPC
method, to convert the newID
from char
to uint8
and then hand over the new variable to the writeData
method.
writeTagEPC
looks like this for me now:
uint8_t RFID::writeTagEPC(char *newID, uint8_t newIDLength, uint16_t timeOut)
{
uint8_t bank = 0x01; //EPC memory
uint8_t address = 0x02; //EPC starts at spot 4
uint8_t * nnewID = (uint8_t*)atoi(newID); // New Line doing the conversion
return (writeData(bank, address, nnewID, newIDLength, timeOut)); // Changed newID to the above created variable nnewID
}
For me this looks like a bug in the library, maybe @nseidle can have a look and fix it properly?
@D3w3y - Thanks! Your code fixed the error. The Uno compiler settings are more forgiving than the MKR and Teensy settings.
Hi @trineon89 - I just committed D3w3y's fix, as well as two additional examples showing how to use hardware serial (instead of softwareSerial). I don't have a MKR1000 to test with but checkout the Examples->Advanced->Example3_HardwareSerial_Write_EPC. It now compiles and correctly writes an EPC to a tag using a Teensy.
I'll lib ver roll the library here shortly. Please test and let us know how it goes.
Trying to get this library running with an Arduino MKR1000 but it fails with the following errors:
Even if the Sketch is complete empty, the line
#include "SparkFun_UHF_RFID_Reader.h"
steps into this failure.All the Versions are the latests:
Some sort of workaround or even better a fix? Thanks in advance