9 Replies Latest reply on Apr 22, 2016 6:13 PM by kkostyuk

    i2c for Edison Arduino Board how it work?

    kkostyuk

      Hello,

       

      I some days try to connect a lot of i2c devices to Edison + Arduino board but cann't understand how it works?!?!
      Firstly I try connect Sparkfun TMP102, after Lidar-Light and now Grove-LCD RGB module.

      As I read Edison Arduino Board provide connection to I2CBUS = 6
      I try to `i2cdetect -y -r 6` comand but it return a lot of errors(Edison firmware version 159.devkit)
      I try a lot of python examples but anyone does not work.
      And finaly I try to connect LCD and python example with UPM - its work!!! But if i try to execute i2cdetect during executing LCD example both programs crached.

       

      Anyone can me explain - what am I doing wrong? how it must work?

        • 1. Re: i2c for Edison Arduino Board how it work?
          CMata_Intel

          Hi kkostyuk,

           

          When you run the example and i2cdetect, do you receive an error message or the board just stops working? If there is an error message, could you send a screenshot of it?

          Have you tried to check the signals that they are of 5V and that there isn’t noise in them?

          Why are you trying to use i2cdetect while running the other code? The problem could be a conflict in the request of the bus.

          Also, check the state of the pull-up resistors Edison + Arduino Expansion Board. Hardware Guide[Section 11.6]

           

          Regards,

          Charlie

          • 2. Re: i2c for Edison Arduino Board how it work?
            kkostyuk

            Hello,
            Create shel script from section 11.6 and execute without any error. GitHub with files.
            Try i2cdetect

            root@PCR2016:~# i2cdetect -y -r 6
                 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
            00:          -- -- -- -- -- -- -- -- -- -- -- -- --
            10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            70: -- -- -- -- -- -- -- --
            root@PCR2016:~# i2cdetect -y -r 1
                 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
            00:          -- -- -- -- -- -- -- -- -- -- -- -- --
            10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            20: UU UU UU UU -- -- -- -- -- -- -- -- -- -- -- --
            30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            70: -- -- -- -- -- -- -- --
            

            But at the same time connected 2 i2c device adreses(0x3E, 0x62) of Grove-LCD.

            Start execute UPM example for LCD - it work, and execute i2cdetect
            Error on 0x3E position and on 0x62.

             

            A long error mesage:

             

            root@PCR2016:~# python lcd/lcd.py &
            [1] 352
            root@PCR2016:~# i2cdetect -y -r 6
                 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
            00:          -- -- -- -- -- -- -- -- -- -- -- -- --
            10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- [   59.111656] i2c-designware-pci 0000:00:09.1: i2c_dw_handle_tx_abort: lost arbitration
            -- [   62.118070] i2c-designware-pci 0000:00:09.1: ===== REGISTER DUMP (i2c) =====
            [   62.118165] i2c-designware-pci 0000:00:09.1: DW_IC_CON:               0x65
            [   62.118238] i2c-designware-pci 0000:00:09.1: DW_IC_TAR:               0x3f
            [   62.118307] i2c-designware-pci 0000:00:09.1: DW_IC_SS_SCL_HCNT:       0x2f8
            [   62.118376] i2c-designware-pci 0000:00:09.1: DW_IC_SS_SCL_LCNT:       0x37b
            [   62.118446] i2c-designware-pci 0000:00:09.1: DW_IC_FS_SCL_HCNT:       0x87
            [   62.118515] i2c-designware-pci 0000:00:09.1: DW_IC_FS_SCL_LCNT:       0x10a
            [   62.118584] i2c-designware-pci 0000:00:09.1: DW_IC_INTR_STAT:         0x0
            [   62.118652] i2c-designware-pci 0000:00:09.1: DW_IC_INTR_MASK:         0x246
            [   62.118721] i2c-designware-pci 0000:00:09.1: DW_IC_RAW_INTR_STAT:     0x10
            [   62.118790] i2c-designware-pci 0000:00:09.1: DW_IC_RX_TL:             0x20
            [   62.118858] i2c-designware-pci 0000:00:09.1: DW_IC_TX_TL:             0x20
            [   62.118927] i2c-designware-pci 0000:00:09.1: DW_IC_ENABLE:            0x1
            [   62.118995] i2c-designware-pci 0000:00:09.1: DW_IC_STATUS:            0x2
            [   62.119062] i2c-designware-pci 0000:00:09.1: DW_IC_TXFLR:             0x1
            [   62.119130] i2c-designware-pci 0000:00:09.1: DW_IC_RXFLR:             0x0
            [   62.119198] i2c-designware-pci 0000:00:09.1: DW_IC_TX_ABRT_SOURCE:    0x0
            [   62.119265] i2c-designware-pci 0000:00:09.1: DW_IC_DATA_CMD:          0x0
            [   62.119332] i2c-designware-pci 0000:00:09.1: ===============================
            [   62.119432] CPU: 0 PID: 358 Comm: i2cdetect Tainted: G        W  O 3.10.17-poky-edison+ #1
            [   62.119437] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
            [   62.119444] task: f547f4d0 ti: f54b4000 task.ti: f54b4000
            [   62.119506] Stack:
            [   62.119574] Call Trace:
            [   62.119993] Code: e8 2f 59 6b 00 8b 15 c0 6c bd c1 b8 02 00 00 00 ff 52 7c eb 0f b8 58 89 41 00 e8 c8 65 2b 00 83 eb 01 74 09 f6 05 00 7b c7 c1 03 <75> e8 f0 80 25 f4 f3 d1 c1 fe eb ab 8b 15 c0 6c bd c1 55 b8 20
            [   62.120017] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G        W  O 3.10.17-poky-edison+ #1
            [   62.120022] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
            [   62.120031] task: f6c83d30 ti: f6e1e000 task.ti: f6e1e000
            [   62.120093] Stack:
            [   62.120162] Call Trace:
            [   62.120370] Code: 50 08 83 e2 08 75 39 31 d2 83 c0 08 89 d1 0f 01 c8 0f ae f0 89 f6 89 e0 25 00 e0 ff ff 8b 40 08 a8 08 75 07 b1 01 89 f0 0f 01 c9 <85> 1d 78 60 c1 c1 75 0d 8d 55 f0 b8 05 00 00 00 e8 47 1a d7 ff
            [   62.121003] i2c-6: recovery ignore
            --
            40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
            60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- [   65.827419] i2c-designware-pci 0000:00:09.1: ===== REGISTER DUMP (i2c) =====
            [   65.827516] i2c-designware-pci 0000:00:09.1: DW_IC_CON:               0x65
            [   65.827595] i2c-designware-pci 0000:00:09.1: DW_IC_TAR:               0x6e
            [   65.827671] i2c-designware-pci 0000:00:09.1: DW_IC_SS_SCL_HCNT:       0x2f8
            [   65.827747] i2c-designware-pci 0000:00:09.1: DW_IC_SS_SCL_LCNT:       0x37b
            [   65.827823] i2c-designware-pci 0000:00:09.1: DW_IC_FS_SCL_HCNT:       0x87
            [   65.827898] i2c-designware-pci 0000:00:09.1: DW_IC_FS_SCL_LCNT:       0x10a
            [   65.827973] i2c-designware-pci 0000:00:09.1: DW_IC_INTR_STAT:         0x0
            [   65.828048] i2c-designware-pci 0000:00:09.1: DW_IC_INTR_MASK:         0x246
            [   65.828123] i2c-designware-pci 0000:00:09.1: DW_IC_RAW_INTR_STAT:     0x10
            [   65.828198] i2c-designware-pci 0000:00:09.1: DW_IC_RX_TL:             0x20
            [   65.828273] i2c-designware-pci 0000:00:09.1: DW_IC_TX_TL:             0x20
            [   65.828348] i2c-designware-pci 0000:00:09.1: DW_IC_ENABLE:            0x1
            [   65.828422] i2c-designware-pci 0000:00:09.1: DW_IC_STATUS:            0x2
            [   65.828496] i2c-designware-pci 0000:00:09.1: DW_IC_TXFLR:             0x1
            [   65.828570] i2c-designware-pci 0000:00:09.1: DW_IC_RXFLR:             0x0
            [   65.828644] i2c-designware-pci 0000:00:09.1: DW_IC_TX_ABRT_SOURCE:    0x0
            [   65.828718] i2c-designware-pci 0000:00:09.1: DW_IC_DATA_CMD:          0x0
            [   65.828791] i2c-designware-pci 0000:00:09.1: ===============================
            [   65.828898] CPU: 0 PID: 358 Comm: i2cdetect Tainted: G        W  O 3.10.17-poky-edison+ #1
            [   65.828904] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
            [   65.828911] task: f547f4d0 ti: f54b4000 task.ti: f54b4000
            [   65.828974] Stack:
            [   65.829043] Call Trace:
            [   65.829472] Code: 10 b3 ff ff 89 f8 09 d0 80 ce 04 83 ff 02 0f 45 d0 a1 94 72 bd c1 89 90 00 b3 ff ff f7 c6 00 02 00 00 74 15 e8 20 58 0b 00 56 9d <83> c4 04 5b 5e 5f 5d c3 8d b6 00 00 00 00 56 9d e8 39 5b 0b 00
            [   65.829497] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G        W  O 3.10.17-poky-edison+ #1
            [   65.829502] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
            [   65.829510] task: f6c83d30 ti: f6e1e000 task.ti: f6e1e000
            [   65.829573] Stack:
            [   65.829642] Call Trace:
            [   65.829850] Code: 50 08 83 e2 08 75 39 31 d2 83 c0 08 89 d1 0f 01 c8 0f ae f0 89 f6 89 e0 25 00 e0 ff ff 8b 40 08 a8 08 75 07 b1 01 89 f0 0f 01 c9 <85> 1d 78 60 c1 c1 75 0d 8d 55 f0 b8 05 00 00 00 e8 47 1a d7 ff
            [   65.876326] i2c-6: recovery ignore
            -- [   68.877060] i2c-designware-pci 0000:00:09.1: ===== REGISTER DUMP (i2c) =====
            [   68.877156] i2c-designware-pci 0000:00:09.1: DW_IC_CON:               0x65
            [   68.877227] i2c-designware-pci 0000:00:09.1: DW_IC_TAR:               0x3e
            [   68.877296] i2c-designware-pci 0000:00:09.1: DW_IC_SS_SCL_HCNT:       0x2f8
            [   68.877365] i2c-designware-pci 0000:00:09.1: DW_IC_SS_SCL_LCNT:       0x37b
            [   68.877435] i2c-designware-pci 0000:00:09.1: DW_IC_FS_SCL_HCNT:       0x87
            [   68.877503] i2c-designware-pci 0000:00:09.1: DW_IC_FS_SCL_LCNT:       0x10a
            [   68.877572] i2c-designware-pci 0000:00:09.1: DW_IC_INTR_STAT:         0x0
            [   68.877640] i2c-designware-pci 0000:00:09.1: DW_IC_INTR_MASK:         0x246
            [   68.877709] i2c-designware-pci 0000:00:09.1: DW_IC_RAW_INTR_STAT:     0x10
            [   68.877778] i2c-designware-pci 0000:00:09.1: DW_IC_RX_TL:             0x20
            [   68.877846] i2c-designware-pci 0000:00:09.1: DW_IC_TX_TL:             0x20
            [   68.877914] i2c-designware-pci 0000:00:09.1: DW_IC_ENABLE:            0x1
            [   68.877982] i2c-designware-pci 0000:00:09.1: DW_IC_STATUS:            0x2
            [   68.878049] i2c-designware-pci 0000:00:09.1: DW_IC_TXFLR:             0x2
            [   68.878117] i2c-designware-pci 0000:00:09.1: DW_IC_RXFLR:             0x0
            [   68.878184] i2c-designware-pci 0000:00:09.1: DW_IC_TX_ABRT_SOURCE:    0x0
            [   68.878252] i2c-designware-pci 0000:00:09.1: DW_IC_DATA_CMD:          0x0
            [   68.878318] i2c-designware-pci 0000:00:09.1: ===============================
            [   68.878417] CPU: 1 PID: 352 Comm: python Tainted: G        W  O 3.10.17-poky-edison+ #1
            [   68.878422] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
            [   68.878429] task: f547de90 ti: f5548000 task.ti: f5548000
            [   68.878491] Stack:
            [   68.878560] Call Trace:
            [   68.878989] Code: 10 b3 ff ff 89 f8 09 d0 80 ce 04 83 ff 02 0f 45 d0 a1 94 72 bd c1 89 90 00 b3 ff ff f7 c6 00 02 00 00 74 15 e8 20 58 0b 00 56 9d <83> c4 04 5b 5e 5f 5d c3 8d b6 00 00 00 00 56 9d e8 39 5b 0b 00
            [   68.879014] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O 3.10.17-poky-edison+ #1
            [   68.879019] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
            [   68.879027] task: c1bce1c0 ti: c1bc8000 task.ti: c1bc8000
            [   68.879090] Stack:
            [   68.879158] Call Trace:
            [   68.879392] Code: 50 08 83 e2 08 75 39 31 d2 83 c0 08 89 d1 0f 01 c8 0f ae f0 89 f6 89 e0 25 00 e0 ff ff 8b 40 08 a8 08 75 07 b1 01 89 f0 0f 01 c9 <85> 1d 78 60 c1 c1 75 0d 8d 55 f0 b8 05 00 00 00 e8 47 1a d7 ff
            [   68.879998] i2c-6: recovery ignore
            ^C[   71.876586] i2c-designware-pci 0000:00:09.1: ===== REGISTER DUMP (i2c) =====
            [   71.876683] i2c-designware-pci 0000:00:09.1: DW_IC_CON:               0x65
            [   71.876755] i2c-designware-pci 0000:00:09.1: DW_IC_TAR:               0x6f
            [   71.876824] i2c-designware-pci 0000:00:09.1: DW_IC_SS_SCL_HCNT:       0x2f8
            [   71.876894] i2c-designware-pci 0000:00:09.1: DW_IC_SS_SCL_LCNT:       0x37b
            [   71.876963] i2c-designware-pci 0000:00:09.1: DW_IC_FS_SCL_HCNT:       0x87
            [   71.877031] i2c-designware-pci 0000:00:09.1: DW_IC_FS_SCL_LCNT:       0x10a
            [   71.877100] i2c-designware-pci 0000:00:09.1: DW_IC_INTR_STAT:         0x0
            [   71.877168] i2c-designware-pci 0000:00:09.1: DW_IC_INTR_MASK:         0x246
            [   71.877237] i2c-designware-pci 0000:00:09.1: DW_IC_RAW_INTR_STAT:     0x10
            [   71.877306] i2c-designware-pci 0000:00:09.1: DW_IC_RX_TL:             0x20
            [   71.877374] i2c-designware-pci 0000:00:09.1: DW_IC_TX_TL:             0x20
            [   71.877442] i2c-designware-pci 0000:00:09.1: DW_IC_ENABLE:            0x1
            [   71.877510] i2c-designware-pci 0000:00:09.1: DW_IC_STATUS:            0x2
            [   71.877577] i2c-designware-pci 0000:00:09.1: DW_IC_TXFLR:             0x1
            [   71.877645] i2c-designware-pci 0000:00:09.1: DW_IC_RXFLR:             0x0
            [   71.877712] i2c-designware-pci 0000:00:09.1: DW_IC_TX_ABRT_SOURCE:    0x0
            [   71.877779] i2c-designware-pci 0000:00:09.1: DW_IC_DATA_CMD:          0x0
            [   71.877846] i2c-designware-pci 0000:00:09.1: ===============================
            [   71.877946] CPU: 0 PID: 358 Comm: i2cdetect Tainted: G        W  O 3.10.17-poky-edison+ #1
            [   71.877951] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
            [   71.877958] task: f547f4d0 ti: f54b4000 task.ti: f54b4000
            [   71.878020] Stack:
            [   71.878088] Call Trace:
            [   71.878469] Code: e8 2f 59 6b 00 8b 15 c0 6c bd c1 b8 02 00 00 00 ff 52 7c eb 0f b8 58 89 41 00 e8 c8 65 2b 00 83 eb 01 74 09 f6 05 00 7b c7 c1 03 <75> e8 f0 80 25 f4 f3 d1 c1 fe eb ab 8b 15 c0 6c bd c1 55 b8 20
            [   71.878493] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G        W  O 3.10.17-poky-edison+ #1
            [   71.878498] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
            [   71.878506] task: f6c83d30 ti: f6e1e000 task.ti: f6e1e000
            [   71.878569] Stack:
            [   71.878637] Call Trace:
            [   71.878845] Code: 50 08 83 e2 08 75 39 31 d2 83 c0 08 89 d1 0f 01 c8 0f ae f0 89 f6 89 e0 25 00 e0 ff ff 8b 40 08 a8 08 75 07 b1 01 89 f0 0f 01 c9 <85> 1d 78 60 c1 c1 75 0d 8d 55 f0 b8 05 00 00 00 e8 47 1a d7 ff
            [   71.879477] i2c-6: recovery ignore
            
            root@PCR2016:~# [   74.876233] i2c-designware-pci 0000:00:09.1: ===== REGISTER DUMP (i2c) =====
            [   74.876329] i2c-designware-pci 0000:00:09.1: DW_IC_CON:               0x65
            [   74.876400] i2c-designware-pci 0000:00:09.1: DW_IC_TAR:               0x3e
            [   74.876470] i2c-designware-pci 0000:00:09.1: DW_IC_SS_SCL_HCNT:       0x2f8
            [   74.876539] i2c-designware-pci 0000:00:09.1: DW_IC_SS_SCL_LCNT:       0x37b
            [   74.876608] i2c-designware-pci 0000:00:09.1: DW_IC_FS_SCL_HCNT:       0x87
            [   74.876677] i2c-designware-pci 0000:00:09.1: DW_IC_FS_SCL_LCNT:       0x10a
            [   74.876746] i2c-designware-pci 0000:00:09.1: DW_IC_INTR_STAT:         0x0
            [   74.876813] i2c-designware-pci 0000:00:09.1: DW_IC_INTR_MASK:         0x246
            [   74.876882] i2c-designware-pci 0000:00:09.1: DW_IC_RAW_INTR_STAT:     0x10
            [   74.876951] i2c-designware-pci 0000:00:09.1: DW_IC_RX_TL:             0x20
            [   74.877019] i2c-designware-pci 0000:00:09.1: DW_IC_TX_TL:             0x20
            [   74.877087] i2c-designware-pci 0000:00:09.1: DW_IC_ENABLE:            0x1
            [   74.877155] i2c-designware-pci 0000:00:09.1: DW_IC_STATUS:            0x2
            [   74.877222] i2c-designware-pci 0000:00:09.1: DW_IC_TXFLR:             0x2
            [   74.877290] i2c-designware-pci 0000:00:09.1: DW_IC_RXFLR:             0x0
            [   74.877358] i2c-designware-pci 0000:00:09.1: DW_IC_TX_ABRT_SOURCE:    0x0
            [   74.877425] i2c-designware-pci 0000:00:09.1: DW_IC_DATA_CMD:          0x0
            [   74.877492] i2c-designware-pci 0000:00:09.1: ===============================
            [   74.877592] CPU: 1 PID: 352 Comm: python Tainted: G        W  O 3.10.17-poky-edison+ #1
            [   74.877597] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
            [   74.877604] task: f547de90 ti: f5548000 task.ti: f5548000
            [   74.877666] Stack:
            [   74.877735] Call Trace:
            [   74.878164] Code: 10 b3 ff ff 89 f8 09 d0 80 ce 04 83 ff 02 0f 45 d0 a1 94 72 bd c1 89 90 00 b3 ff ff f7 c6 00 02 00 00 74 15 e8 20 58 0b 00 56 9d <83> c4 04 5b 5e 5f 5d c3 8d b6 00 00 00 00 56 9d e8 39 5b 0b 00
            [   74.878188] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O 3.10.17-poky-edison+ #1
            [   74.878193] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
            [   74.878201] task: c1bce1c0 ti: c1bc8000 task.ti: c1bc8000
            [   74.878264] Stack:
            [   74.878332] Call Trace:
            [   74.878566] Code: 50 08 83 e2 08 75 39 31 d2 83 c0 08 89 d1 0f 01 c8 0f ae f0 89 f6 89 e0 25 00 e0 ff ff 8b 40 08 a8 08 75 07 b1 01 89 f0 0f 01 c9 <85> 1d 78 60 c1 c1 75 0d 8d 55 f0 b8 05 00 00 00 e8 47 1a d7 ff
            [   74.879172] i2c-6: recovery ignore
            Traceback (most recent call last):
              File "lcd/lcd.py", line 16, in <module>
                lcd = pyupm_i2clcd.Jhd1313m1(I2CBUS, 0x3E, 0x62)
              File "/usr/lib/python2.7/site-packages/pyupm_i2clcd.py", line 492, in __init__
                this = _pyupm_i2clcd.new_Jhd1313m1(bus, lcdAddress, rgbAddress)
            RuntimeError: UPM Runtime Error: upm::Jhd1313m1::Jhd1313m1(int, int, int): Unable to initialise the LCD controller
            
            • 3. Re: i2c for Edison Arduino Board how it work?
              kkostyuk

              One more point. About hardware.

              • Edison
              • Arduino board from Intel
              • Grove Base shield(3v3_vcc_5v set to 5v) from Intel IoT Start-kit
              • Grove -LCD RGB from Intel IoT Start-kit
              • 4. Re: i2c for Edison Arduino Board how it work?
                CMata_Intel

                Hi kkostyuk,

                 

                I used your configuration with 159.devkit and 146 versions and had the same output.

                Once you run the code lcd.py it seems that mraa changes the I2C configuration, one thing you could try is to re-install or update the i2ctools in the board.

                Is the UPM code working fine for you?

                 

                Regards,

                Charlie

                • 5. Re: i2c for Edison Arduino Board how it work?
                  kkostyuk

                  Hello,

                   

                  I remove and install i2c-tools and i2c-tools-misc. Upgrede mraa and upm.
                  No any changes, behevior the same.

                   

                  I make some experiments and found mraa are makes additional changes from the section 11.6

                  First

                  1. execute i2c_mux.sh. No any error.
                  2. execute i2cdetect -y -r 6. No any adreses detected but LCD(0x3E, 0x62) connected.
                  3. execute lcd.py. No any error, LCD show messages and change colors.
                  4. execute i2cdetect -y -r 6. Crashed on adreses 0x3E and 0x62.

                  Second

                  1. execute i2cdetect -y -r 6. Crashed on first adres.
                  2. execute lcd.py. No any error, LCD show messages and change colors.
                  3. execute i2cdetect -y -r 6. Crashed on adreses 0x3E and 0x62.

                  Script and python example available on GitHub with files.

                   

                  UPM example work fine, but i have some modules wthout UPM libs and I would like connect them via python+mraa.

                  For this connection I have not got understanding how it work!
                  I conect this modules to RasPi without any problem.

                  • 6. Re: i2c for Edison Arduino Board how it work?
                    kkostyuk

                    One more experement

                    1. Detach Grove-LCD(0x3E, 0x62)
                    2. Atach Lidar-Light(0x62)
                    3. execute i2c_mux.sh. No any error.
                    4. execute i2cdetect -y -r 6. No any adreses detected. Lidar-Light(0x62) connected.
                    5. execute lcd.py. Have error no LCD device.
                    6. execute i2cdetect -y -r 6. No carshes and see 0x62 adress.


                    root@PCR2016:~# ./i2c_mux.sh
                    root@PCR2016:~# i2cdetect -y -r 6
                         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
                    00:          -- -- -- -- -- -- -- -- -- -- -- -- --
                    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                    70: -- -- -- -- -- -- -- --
                    
                    root@PCR2016:~# python lcd/lcd.py
                    Traceback (most recent call last):
                      File "lcd/lcd.py", line 8, in <module>
                        lcd = pyupm_i2clcd.Jhd1313m1(I2CBUS, 0x3E, 0x62)
                      File "/usr/lib/python2.7/site-packages/pyupm_i2clcd.py", line 532, in __init__
                        this = _pyupm_i2clcd.new_Jhd1313m1(bus, lcdAddress, rgbAddress)
                    RuntimeError: UPM Runtime Error: upm::Jhd1313m1::Jhd1313m1(int, int, int): Unable to initialise the LCD controller
                    
                    root@PCR2016:~# i2cdetect -y -r 6
                         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
                    00:          -- -- -- -- -- -- -- -- -- -- -- -- --
                    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                    60: -- -- 62 -- -- -- -- -- -- -- -- -- -- -- -- --
                    70: -- -- -- -- -- -- -- --
                    
                    root@PCR2016:~# i2cdump -y 6 0x62
                    No size specified (using byte-data access)
                         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
                    00: 00 27 80 51 80 78 04 f9 86 ff 0d 34 e5 67 bd 00    .'?Q?x???.?4?g?.
                    10: c0 ad 00 00 00 bf 18 22 43 02 30 00 00 00 00 00    ??...??"C?0.....
                    20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
                    30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
                    40: 00 14 00 00 00 00 00 24 00 9a 00 00 34 00 00 06    .?.....$.?..4..?
                    50: 00 00 00 00 00 00 1e 0d 34 e5 67 bd 00 00 00 6d    ......??4?g?...m
                    60: 14 00 70 53 d8 00 00 00 00 00 00 00 00 00 00 00    ?.pS?...........
                    70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
                    80: 00 27 80 51 80 78 04 f9 86 ff 0d 34 e5 67 bd 00    .'?Q?x???.?4?g?.
                    90: c0 ad 00 00 00 bf 18 22 43 02 30 02 00 00 00 00    ??...??"C?0?....
                    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
                    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
                    c0: 00 14 00 00 00 00 00 24 00 74 00 00 34 00 00 06    .?.....$.t..4..?
                    d0: 00 00 00 00 00 00 1e 0d 34 e5 67 bd 00 00 00 6d    ......??4?g?...m
                    e0: 14 00 70 53 d8 00 00 00 00 00 00 00 00 00 00 00    ?.pS?...........
                    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
                    
                    • 7. Re: i2c for Edison Arduino Board how it work?
                      CMata_Intel

                      Hi kkostyuk,

                       

                      Yes, MRAA does changes in order to be able to run the different functions. If you want to use python + I2C you can use the MRAA library and create your own classes or your code according to the requirements of the project.

                      You can also try with smbus for python.

                      Regarding to the problems with i2cdetect and the Lidar-Light, are you using the correct voltages to power the device? Does it use 3.3V or 5V?

                      Also, have you tried to use a logic analyzer to check the signals on the bus?

                      Does this shield also use the 0x3E and 0x62 addresses?

                       

                      Regards,

                      Charlie

                      • 8. Re: i2c for Edison Arduino Board how it work?
                        kkostyuk

                        Sorry for long delay.
                        Unfortunately i have not got a lot of times for investigation of crude product.
                        I connect lidar and other i2c modules to RasPi and happy.

                         

                        My small opinion, please add function of Init and Mux of pins to edison_config.sh

                        • 9. Re: i2c for Edison Arduino Board how it work?
                          kkostyuk

                          After installing version 3.0 I connect to Lidar and read distance data by i2c-utils and python(mraa) code.