Go Down

Topic: Issues with Yun + I2C (Read 2 times) previous topic - next topic

jgilbert20

Arduino Hackers,

I just got my Yun and am very excited to be able to leverage Linux + Arduinio! I've been having some unusual compatibility issues with some fairly simple setups (just Power + I2C) that work perfectly on my Uno and not on the Yun. Some help would be appreciated since I am stuck at the very start of my project. I want to use the Yun ultimately as a bridge between a wireless Ciseco XRF network and google documents, with a 16x2 LCD on top to show status and verify everything is working.

I am trying to stack three shields together: a Yun + Protoboard + Adafruit 16x2 shield (which uses SDA/SCL only to communicate). To start, I have left the protoboard entirely unconnected (e.g. nothing is wired on it) so theoretically its just a pass through. I added a simple hello world sketch to prove that the 16x2 display is wokring and responding to button presses. This stack works just fine on both of my Unos.

This same configuration doesn't work on the Yun. To eliminate variables, I then removed the protoboard, connecting the 16x2 shield directly onto the Yun with a pair of stacking headers inserted to clear the ethernet port. This DOES work. Then I tried connecting 3" jumper cables directly from the Yun to the 16x2 shield (on 5V, A4, A5, GND). This also didn't work. All of these same setup function perfectly fine on the Uno. Sketch on both is identical.

So to summarize, all of these circuits work on the Uno, but only some work on the Yun:

YES Arduino + Stacking Headers + Adafruit 16x2
NO Arduino + Stacking Headers + Blank protoboard + Adafruit 16.x3
NO Arduino + 3" Male to Female Jumpers + Adafruit 16x2

These work find on a variety of other Arduinos I have (including a 5V Pro Mini); I can't acertain why the Yun is so different.

I have read the Yun hardware specification many times and cannot understand why it should be behaving any differently.

Anyone have any ideas? I can share photos of the setup if that is helpful.

James C4S


Then I tried connecting 3" jumper cables directly from the Yun to the 16x2 shield (on 5V, A4, A5, GND). This also didn't work.

I2C isn't on A4 and A5 on the Yún.

http://arduino.cc/en/Main/ArduinoBoardYun:
Quote

TWI: 2 (SDA) and 3 (SCL). Support TWI communication using the Wire library.

Looks like it is on Digital 2 and Digital 3.

Shield connections that use the dedicated pins next to AREF will probably work as well.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

jgilbert20

Ahah, that could definitely be the issue. When the shield is mated directly it must be pulling i2c from the spare pins.

Thanks for the help.

Jeremy

Potikinawah

#3
Apr 10, 2014, 12:01 pm Last Edit: Apr 10, 2014, 02:46 pm by Potikinawah Reason: 1
Hi,

Did it work for you Jeremy ?

I'm having quite the same issue with a no name "MPU-5060 type" sensor.
it's got VCC in / 3.3V / GND / SCL / SDA / FSYNC / INTA / DRDY pins

Connections are as following
GND => GND
3.3v => 3.3v
SDA => Yun digital pin 2 (juste after the TX Pin)
SCL => Yun digital pin 3

The sensor seems to turn on (led is on)
The Yun is connected to my laptop thru the micro-USB port (maybe it's the problem, i understood the standard usb port, ethernet and wifi connections are connected thru bridge and the linino, but i assumed i could get information from the 32U4 from the micro-usb port, might be wrong ?)
The i2c scanner is correctly uploaded on the board (AVRISP mkii programmator) but can't find any i2c device.

Would someone have any idea (i'm totally noob using this, i'm a dancer/circus artist and my "science" is usually more physically oriented)

Thanks
The only way to do it is to do it. (Merce Cunningham)

James C4S


I'm having quite the same issue with a no name "MPU-5060 type" sensor.

How about a link to the hardware you are actually using.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Potikinawah

This is the sensor I have.
I got a simple compass with i2c connectivity, and the i2c scanner works perfectly over it, so i tested the MPU-6050 with a voltmeter and the i2c pins don't give anything out actually, i guess it's just burned...

Sorry for the inconvenience, still thank you for the reply
The only way to do it is to do it. (Merce Cunningham)

James C4S


so i tested the MPU-6050 with a voltmeter and the i2c pins don't give anything out actually

I2C is an open collector bus.  If you don't measure using pull-up resistors, your voltmeter won't measure anything.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up