i2c scanner not working

Discussion in 'Arduino IDE' started by hl68fx, Nov 22, 2013.

  1. hl68fx

    hl68fx New Member

    Joined:
    Jun 11, 2013
    Messages:
    24
    Likes Received:
    0
    Hi,

    i have tried to get my mpu9150 working on udoo. So first of all i used the i2c scanner from arduino.cc to get the adress of the sensor but that seems to be impossible. It displays only: No i2c devices found.
    The mpu9150 is ok because the i2c scanner works on my Arduino Uno.

    Can anybody confirm that the i2c scanner is not working on Udoo?
    Do you have a solution?

    Kind regards
     
  2. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Which Pins are you trying to use?

    Have you changed their 'function' from the default behaviour (EG GPIO) to I2C?
     
  3. hl68fx

    hl68fx New Member

    Joined:
    Jun 11, 2013
    Messages:
    24
    Likes Received:
    0
    I used SDA, SCL and SDA1, SCL1. Both did not work. How can I change the default behavior? I think this could be the solution for my Problem :)
     
  4. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    To avoid confusion, which pin numbers are you trying?

    Pin function is somewhat abstracted from pin number.
     
  5. hl68fx

    hl68fx New Member

    Joined:
    Jun 11, 2013
    Messages:
    24
    Likes Received:
    0
    I looked into Udoo_pinout_diagram and used gpio 92, 85 (SDA, SCL) and then the two pins above AREF.
     
  6. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    I can't check atm (on phone) but if you've checked the pinouts and documentation then you just need to map the pin function.

    The getting started guide covers that fairly well, pages 31-36 iirc. Basically most Pins have upto 7 'modes' or functions, defaulting to GPIO. Jump on IRC if you get stuck, we're quite helpful and don't bite (much).
     
  7. bboyandru

    bboyandru New Member

    Joined:
    Apr 8, 2014
    Messages:
    2
    Likes Received:
    0
    Hi!

    I am also having issues with UDOO quad with Arduino Due.
    I am trying to see either Si4703 or TEA5767 devices on the i2c bus using the i2c scanner, but I am getting only 'No I2C devices found'.
    I have put 4k7 pull up resistors.
    I am using pins 20 and 21(SDA1 and SCL1 on SAM3X8E mcu) which are on top of AREF pin in the Arduino shield.
    I looked into <arduino dir>/hardware/arduino/sam/libraries/Wire/Wire.cpp and the SCL and SDA pins seems that are configured:
    Code:
    PIO_Configure(
    	g_APinDescription[PIN_WIRE_SDA].pPort,
    	g_APinDescription[PIN_WIRE_SDA].ulPinType,
    	g_APinDescription[PIN_WIRE_SDA].ulPin,
    	g_APinDescription[PIN_WIRE_SDA].ulPinConfiguration);
    PIO_Configure(
    	g_APinDescription[PIN_WIRE_SCL].pPort,
    	g_APinDescription[PIN_WIRE_SCL].ulPinType,
    	g_APinDescription[PIN_WIRE_SCL].ulPin,
    	g_APinDescription[PIN_WIRE_SCL].ulPinConfiguration);
    and also saw that PIN_WIRE_SDA is 20 and PIN_WIRE_SCL is 21.
    I don't know where to find the g_APinDescription declaration to see what it is for I2C.
     
  8. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    It`s been said on here and the due forum , some part of the wire library does not work / are missing .
    The i2c_scanner does not work , but most of the library does.
     
  9. mattt

    mattt New Member

    Joined:
    Sep 4, 2014
    Messages:
    5
    Likes Received:
    1
    Did you solve this problem? I am stuck on the same issue.
     
  10. RobotFreak

    RobotFreak New Member

    Joined:
    Sep 9, 2014
    Messages:
    1
    Likes Received:
    0
    Hi,

    this issue has been solved in Arduino version v1.5.7. I have succesfully tested the i2cscanner sketch on pin 20,21 (SDA, SCL) by programming the Udoo from a windows machine using Arduino v1.5.7.

    regards Peter
     
  11. peter247

    peter247 New Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    glad to know , and will have to try it and see if it works for me.
     

Share This Page