3 Replies Latest reply on Aug 21, 2015 3:55 PM by PabloM_Intel

    Grove NFC v1.1 with Sparkfun I2C Block on Edison

    ankur2

      I am trying to use Grove NFC Reader v1.1 over I2C connection with Intel Edison and Sparkfun's Stackable Blocks. Unfortunately, Sparkfun (Seedstudio) only provides library for Arduino IDE and I am using Eclipse C++

       

      I do have the I2C block detecting the NFC reader on bus 1 judging by the output of i2cdetect -y -r 1

      Output:

          0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

      00:          -- -- -- -- -- -- -- -- -- -- -- -- --

      10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

      20: -- -- -- -- 24 -- -- -- -- -- -- -- -- -- -- --

      30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

      40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

      50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

      60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

      70: -- -- -- -- -- -- -- --

       

      Does anyone have any suggestions on how to make this reader work in Eclipse?

       

      Grove NFC Reader: http://www.seeedstudio.com/wiki/Grove_-_NFC

      Sparkfun I2C Block: SparkFun Block for Intel® Edison - I2C - DEV-13034 - SparkFun Electronics

       

      Thanks

      Ankur

        • 1. Re: Grove NFC v1.1 with Sparkfun I2C Block on Edison
          PabloM_Intel

          Hi ankur2,

           

          Could you please provide the Sparkfun library for the Arduino IDE that you mention in your post? I don’t seem to find it in the links you provided. Still, the Arduino uses C++ as its programming language, so the library you mention should be written in C++. Now, it would be necessary to check if the library has any AVR architecture dependencies, but if that’s not the case you should be able to use it with Eclipse.

           

          Regards,

          PabloM_Intel

          • 2. Re: Grove NFC v1.1 with Sparkfun I2C Block on Edison
            ankur2

            Thanks for your reply PabloM_Intel

             

            I think the library is from Seed Studio, which is where I bought the NFC Reader from. Sorry for the mistake in the original post. Below is the GitHub link for the same.

            Seeed-Studio/PN532 · GitHub

             

            Thanks

            ankur2

            • 3. Re: Grove NFC v1.1 with Sparkfun I2C Block on Edison
              PabloM_Intel

              Hi ankur2,

               

              If you want to use the PN532 library on Eclipse IDE, you’ll need to add the necessary files to the appropriate folder of the Eclipse software (the libraries folder). After reviewing the C++ code, I noticed that Wire.h and Arduino.h are being called (along with some other specific PN532 files), so it would be necessary to export these libraries. Remember that Wire.h has been edited so that it works with the x86 architecture, make sure that you export the correct Wire.h library. And according to the comments in the GitHub webpage you provided, Arduino.h should be replaced with stdint.h, so I would suggest you to take a closer look at that file.

               

              Regards,

              PabloM_Intel