8x8 bi-colour LED matrix I2C neo

Discussion in 'UDOO NEO' started by Robert the writer, May 25, 2016.

Tags:
  1. Robert the writer

    Robert the writer New Member

    Joined:
    May 25, 2016
    Messages:
    2
    Likes Received:
    0
    Hi I'm trying to connect an Adafruit 8x8 bi-colour LED matrix via I2C to the Neo. The LED matrix works fine on a standard Arduino Uno R3 using the Adafruit example code. However, attaching this to the Neo's I2C 2 connectors stops the Neo from booting. If I try to connect SDA&SCL after the Neo has booted it doesn't stop the Neo running but IC2detect does not find it.

    Any suggestions anyone?
     
  2. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    The Neo isn't "Arduino compatible", it just can be programmed through the Arduino IDE. You might need to adapt any library you are going to use in order to use it on the Neo. See "Porting Libraries" for more information.
     
  3. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    And the I2C-2 that is attached to the Arduino SDA/SCL pins first have to be activated through the Device tree editor:
    http://www.udoo.org/docs-neo/Cookbook_Linux/Device_Tree_Editor.html

    I2C-2: SNAP-IN Bricks connector

    By default the snap-in connector is assigned to the A9 and it’s possible to control it by Linux driver. The I2C signal are also available on SDA - SCL pins and on pins 36/37.

    If you need to use this on the M4 Arduino core, you need to remove it from the A9 core, right-clicking on the corresponding pins and removing it.

    After a reboot it will be possible to connect an external I2C device to the SDA SCL pins and control it from the Arduino M4 core.
     
  4. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    @waltervl. You are talking about the snap-in connector, but the default pins are 14 (SDA) & 15 (SCL), which are by default assigned to the M4. I connected a i2c sensor to the pins and it worked automatically.
     
  5. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Well, I dont understand the docs then :(
    Pin 14/15 are the same as SDA/SCL and connected to I2C-2. Only in the Device tree editor it is stated that I2C-2 is assigned to Linux and should be removed to have them available in Arduino.
    [​IMG]
     
  6. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    Does only wiring them already make the Neo hang, or as soon as you use your library?
     
  7. Robert the writer

    Robert the writer New Member

    Joined:
    May 25, 2016
    Messages:
    2
    Likes Received:
    0
    Maurice

    It hangs when I power it up, so I don't manage to find out what is going on.

    Also, and sorry for the confusion, I'm not trying to access these from the Arduino core but from Linux. I only tested the LED matrix on an Arduino to check that it was still working! I actually want to use it via I2C under Linux.
     
  8. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    It should work from the linux side although I never use the 'device tree editor' for alterations instead I manually update the dts files to my needs. For example I'm currently using I2C4 which are routed to J5 pins:

    GIPO_202/PWM_2/USB_HSIC_STROBE/I2C4_SDA
    GIPO_202/PWM_1/USB_HSIC_DATA/I2C4_SCL

    From memory I think you need to comment out the following lines in imx6sx-udoo-neo-externalpins.dtsi

    MX6SX_PAD_USB_H_STROBE__GPIO7_IO_11 0x80000000 // {{external-gpio-34}}
    MX6SX_PAD_USB_H_DATA__GPIO7_IO_10 0x80000000 // {{external-gpio-35}}
     
  9. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    The i2c lines are pulled up high by resistors by default arduino is 5v but neo is 3.3v this is maybe your issue... Please check this before connecting any shield to neo

    Gesendet von meinem FP2 mit Tapatalk
     

Share This Page