Pages: [1]   Go Down
Author Topic: How to hook up multiple sensors that all require analog pins 4 & 5  (Read 212 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Everyone,

I'm sure this has been asked before but I haven't been able to find a forum post on the topic.  Is there a good way(or is it even possible) to hook up multiple sensors to an Arduino Uno that require pins 4 and 5?  From what I understand 4 and 5 are special?

As an example can I use a BMP085 Altimeter with a MPU-6050 accelerometer/gyroscope? I have used both independently to make the calculations I require, but can they be used together? If so does anyone have an example? (http://playground.arduino.cc/Main/MPU-6050)
« Last Edit: October 23, 2013, 03:32:39 pm by Bms85 » Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Analog pins 4 and 5 double up as the I2C pins SCL and SDA - that's what's special about them. You can connect multiple I2C devices (such as one BMP085 and one MPU6050) to these pins, as long as they have different addresses - which should be the case if they are different devices.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

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

Analog pins 4 and 5 double up as the I2C pins SCL and SDA - that's what's special about them. You can connect multiple I2C devices (such as one BMP085 and one MPU6050) to these pins, as long as they have different addresses - which should be the case if they are different devices.

Thanks! that was way easier than I expected.
Logged

Pages: [1]   Go Up
Jump to: