Arduino IDE sample sketch "UHF-RFID-JRD4035" have error
After compile sample sketch "UHF-RFID-JRD4035", Arduino IDE shows
"no return statement in function returning non-void [-Werror=return-type]" on "RFID_command.cpp"
UBYTE UHF_RFID::Set_the_communication_baud_rate(UWORD Pow)
ToHex(Pow, 5, 6);
} <- this line have error
If possible ,could you help me how to solve this problem ?
I use Atom lite esp32 ,therefore my Arduino IDE setting is as follows
Board :ESP32 Pico Kit
Upload speed :115200
felmue last edited by felmue
it seems that the example code for this unit is not written very cleanly and the compilation generates a couple of warnings. But for me it compiles through (eg. no errors just warnings) and generates an executable. (Although I have no way to verify the result as I do not own this particular unit.)
The reason for the warning is that this particular function has been defined to return an UBYTE but it doesn't.
So if you'd like to fix that warning you could simply add a
return 0;just before the functions closing bracket.
Dear felmue san,
Thank you for your kindly reply!!
I will try based on your advice from now on !
Dear Feimue san
I added "_Noreturn" command on ahead of original sketch as follows
_Noreturn UBYTE UHF_RFID::Set_the_communication_baud_rate(UWORD Pow)
Result : "UHF-RFID-JRD4035" can get data from IC Tag.
--------- Serial monitor ------------
3:02:04.513 -> RSSI :c8
23:02:04.513 -> PC :3000
23:02:04.513 -> EPC :e2806894000040066d70b524
23:02:04.513 -> CRC :7084
23:02:04.607 -> RSSI :c7
23:02:04.607 -> PC :3000
23:02:04.607 -> EPC :e2806894000040066d70b524
23:02:04.607 -> CRC :7084
23:02:04.700 -> RSSI :ca
23:02:04.700 -> PC :3000
23:02:04.700 -> EPC :e2806894000040066d70b524
23:02:04.700 -> CRC :7084
felmue last edited by
great! I am happy to read you solved the issue. And I learned something new as I didn't know about
_Noreturn- thank you for letting me know.
Bat21 last edited by
I am in your same situation, I have been trying to communicate UHF-RFID-UNIT with Aton Lite and I don't know the right code.
Could you spend the code to start my project?