🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Arduino IDE sample sketch "UHF-RFID-JRD4035" have error

    PRODUCTS
    3
    6
    6.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      PAOPAO
      last edited by

      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)
      {

      Copy_command_library(13);

      ToHex(Pow, 5, 6);

      Check_bit_accumulation();
      Send_the_modified_command();

      } <- 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

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by felmue

        Hello @PAOPAO

        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.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        P 1 Reply Last reply Reply Quote 1
        • P
          PAOPAO @felmue
          last edited by

          Dear felmue san,
          Thank you for your kindly reply!!
          I will try based on your advice from now on !

          P 1 Reply Last reply Reply Quote 0
          • P
            PAOPAO @PAOPAO
            last edited by

            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.513 ->
            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.607 ->
            23:02:04.700 -> RSSI :ca
            23:02:04.700 -> PC :3000
            23:02:04.700 -> EPC :e2806894000040066d70b524
            23:02:04.700 -> CRC :7084

            1 Reply Last reply Reply Quote 0
            • felmueF
              felmue
              last edited by

              Hello @PAOPAO

              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.

              Thanks
              Felix

              GPIO translation table M5Stack / M5Core2
              Information about various M5Stack products.
              Code examples

              1 Reply Last reply Reply Quote 0
              • Bat21B
                Bat21
                last edited by

                Hi Paopao,
                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?

                Thank you

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post