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

    [Solved]M5Stack, Arduino, RFID Module example needed

    Scheduled Pinned Locked Moved Units
    13 Posts 4 Posters 32.7k Views 1 Watching
    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.
    • K Offline
      Kees
      last edited by m5-docs

      Hi there, is there an example somewhere that shows how to use an RFID rc522 i2c module (module like in this post: M5Stick-C can not detected RFID Unit). I have no idea what I need to make it working (libraries and possibly other wiring). I am using the M5Stack with Arduino and installed software from here: https://github.com/miguelbalboa/rfid. Probably not usable because it shows the library might be incompatible.
      Someone out there that can give me a kickstart with tutorial example how to use these three together (Arduino, M5Stack and RFID module)?

      1 Reply Last reply Reply Quote 0
      • ajb2k3A Offline
        ajb2k3
        last edited by

        Have you tried the I2C scanner to find the RFID device?

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        K 1 Reply Last reply Reply Quote 0
        • K Offline
          Kees @ajb2k3
          last edited by

          @ajb2k3 Okay, I found the I2C tester and ran it. It shows the addresses 0x68 and 0x75. With the device attached it also shows 0x28. When not attached this disappears. Does this mean the device can be found and the hardware wiring is okay? If so the focus is on a software problem.

          ajb2k3A 1 Reply Last reply Reply Quote 0
          • ajb2k3A Offline
            ajb2k3 @Kees
            last edited by

            @kees said in M5Stack, Arduino, RFID Module example needed:

            @ajb2k3 Okay, I found the I2C tester and ran it. It shows the addresses 0x68 and 0x75. With the device attached it also shows 0x28. When not attached this disappears. Does this mean the device can be found and the hardware wiring is okay? If so the focus is on a software problem.

            Yes, that is correct, 0x28 is the address so it is being read.
            The RFID uses the MFRC522 to read and write to 13.56MHz devices.
            Try looking for guides on the MRFC522 readers

            UIFlow, so easy an adult can learn it!
            If I don't know it, be patient!
            I've ether not learned it or am too drunk to remember it!
            Author of the WIP UIFlow Handbook!
            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

            1 Reply Last reply Reply Quote 0
            • K Offline
              Kees
              last edited by

              Thanks, this was very helpful. So now the problem is software. As I stated in the first part of the topic: I use software found at https://github.com/miguelbalboa/rfid. Has anyone experience with this in combination with Arduino, M5Stack and the RFID Module with RC522? Or perhaps anyone tells me to use a different IDE and language (I have enough experience with C, but not C++). All suggestions are welcome.

              1 Reply Last reply Reply Quote 0
              • m5-docsM Offline
                m5-docs
                last edited by

                @Kees Have you tried this code?
                https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Unit/RFID/Arduino

                M5Stack documentation URL

                https://docs.m5stack.com

                1 Reply Last reply Reply Quote 0
                • ajb2k3A Offline
                  ajb2k3
                  last edited by

                  There is sample code here - https://docs.m5stack.com/#/en/unit/rfid

                  I have ordered one and will see what I can do, btw had to order cards from elsewhere.

                  UIFlow, so easy an adult can learn it!
                  If I don't know it, be patient!
                  I've ether not learned it or am too drunk to remember it!
                  Author of the WIP UIFlow Handbook!
                  M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    Kees
                    last edited by

                    Thanks, both(?). I ran the example and it does seem to work. I also saw that an addition for this library is in the pipeline: https://github.com/miguelbalboa/rfid to also support ESP32.
                    I can continue building software for the M5Stack hardware with my requirements using, among others, the RFID module, the same ajb2k3 ordered.
                    Again, thanks!!!

                    m5-docsM ajb2k3A 2 Replies Last reply Reply Quote 0
                    • m5-docsM Offline
                      m5-docs @Kees
                      last edited by

                      @kees Have a good day.

                      M5Stack documentation URL

                      https://docs.m5stack.com

                      1 Reply Last reply Reply Quote 0
                      • ajb2k3A Offline
                        ajb2k3 @Kees
                        last edited by

                        @kees said in [Solved]M5Stack, Arduino, RFID Module example needed:

                        Thanks, both(?). I ran the example and it does seem to work. I also saw that an addition for this library is in the pipeline: https://github.com/miguelbalboa/rfid to also support ESP32.
                        I can continue building software for the M5Stack hardware with my requirements using, among others, the RFID module, the same ajb2k3 ordered.
                        Again, thanks!!!

                        The code base doesn't support I2C which is used By the M5Stack device.

                        UIFlow, so easy an adult can learn it!
                        If I don't know it, be patient!
                        I've ether not learned it or am too drunk to remember it!
                        Author of the WIP UIFlow Handbook!
                        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                        K 1 Reply Last reply Reply Quote 0
                        • K Offline
                          Kees @ajb2k3
                          last edited by

                          @ajb2k3 To understand correctly. The M5Stack can use both SPI and I2C (as does the ESP32), however the RFID device I have (and you ordered) only uses I2C, and the code for the library I mentioned only supports SPI. The code you both mentioned supports I2C (Grove Port device). So assuming the tag functions suffice I should use that. Correct or nonsense.

                          1 Reply Last reply Reply Quote 0
                          • ajb2k3A Offline
                            ajb2k3
                            last edited by

                            Yes, you should use the I2C code to experiment. Looks like I won’t be able to help more for another two weeks until mine arrives

                            UIFlow, so easy an adult can learn it!
                            If I don't know it, be patient!
                            I've ether not learned it or am too drunk to remember it!
                            Author of the WIP UIFlow Handbook!
                            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                            1 Reply Last reply Reply Quote 0
                            • C Offline
                              ChristianH
                              last edited by

                              Hi,

                              Sorry for pulling this olde thread up.

                              I really need an Arduino example on how to read and write I can't seem to find any examples on that.

                              Best regards,
                              Christian

                              1 Reply Last reply Reply Quote 0

                              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                              With your input, this post could be even better 💗

                              Register Login
                              • First post
                                Last post