3 Replies Latest reply on Apr 6, 2015 9:38 AM by JPMontero_Intel

    I2C l3g4200D Arduino IDE

    utya

      Hi, everybody.

      Have some problem with connecting l3g4200d and intel edison. I'm usnig this library pololu/l3g4200d-arduino · GitHub And in serial port i have uint16_t data, but in code i use int data. For arduino is fine, but for edison is

      Yocto 1.6.1.

        • 1. Re: I2C l3g4200D Arduino IDE
          JPMontero_Intel

          Hi utya,

           

          Are you getting errors in the IDE or the code is just not working as expected? Also make sure the library doesn’t use AVR macros or dependencies, if it does have, you need to write a workaround for them. Have you tried using unsigned int instead of the int? You can also check the output with a logic analyzer or an oscilloscope to see if it is showing the right signal.

           

          Regards,
          JPMontero_Intel

          • 2. Re: I2C l3g4200D Arduino IDE
            utya

            code is just working. I tried to  use float, int , long but not result. so i think problem in avr macros. Where can i read about workaroud for them. Thanks

            • 3. Re: I2C l3g4200D Arduino IDE
              JPMontero_Intel

              There aren't any guides on how to write workarounds for AVR Macros. You would have to find the definition of the AVR specifics that are causing issues read how they work and write a code to replace their functionality. Also you mention the code is working but there are issues then you use other data types, the issue could be that the code is using the wrong data type of mixing them up.

               

              Regards,
              JPMontero_Intel