Pages: [1]   Go Down
Author Topic: Issues with Yun + I2C  (Read 2291 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Paris, France
Offline Offline
Newbie
*
Karma: 2
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: April 10, 2014, 07:46:25 am by Potikinawah » Logged

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

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Paris, France
Offline Offline
Newbie
*
Karma: 2
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Pages: [1]   Go Up
Jump to: