3 Replies Latest reply on Jan 1, 2015 7:57 AM by KurtE

    Problem on I2C library

    lekern

      Hi,

       

         I need to use the i2c library from http://www.dsscircuits.com/index.php/articles/66-arduino-i2c-master-library in Arduino IDE. Unfortunately, I unable to compile the sketch using the library.

         Do anyone have a solution for it? Thank you in advance.

       

      best regards,

      Lekern

        • 1. Re: Problem on I2C library
          JPMontero_Intel

          HI lekern,

           

          If the library was written to be used with the Arduino Uno it probably won’t work in Edison nor with Galileo. This is due that these libraries use MACROs and registers from AVR architecture and this need to be ported into the architecture of the Edison in order to work. Could you attach the error you are getting when compiling?

           

          Regards,
          JPMontero_Intel

          • 2. Re: Problem on I2C library
            KurtE

            Just out of curiosity I took a quick look at it.  This library is specifically set up for the Atmega processors. Some one would need either to convert your code to use the Native wire library or update this library to work on the Edison. 

             

            This code base is directly modifying the Atmega processor IO registers associated with I2C. 

            • 3. Re: Problem on I2C library
              KurtE

              Note: it would be great if Intel did something similar to what Paul of PJRC did for the Teensy 3.x processors, where he defined some c++ classes with operator overloads and the like to emulate the SPI registers.   So porting of libraries like this is a lot easier.   Not sure if Paul or if anyone else has ported this library to work on those processors, but if they have, it might be easier to look at what they did and emulate it for the Edison.   I do know that there are some Teensy specific I2C libraries up on their forum.