Pages: [1]   Go Down
Author Topic: How to use 12C with two arduinos and barometer  (Read 302 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to use the following barometer:  https://www.sparkfun.com/products/9694

In order to do so I believe I have to use the i2C interface via analog pins 4 and 5.  I also need to connect twp arduinos together due to memory and processing issues. 

Is it possible to use this barometer AND two arduinos at the same time?  When I look at this page:  http://arduino.cc/en/Tutorial/MasterWriter

It appears that I need to use the same pins to connect two Arduinos together that are necessary for the barometer to work...
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 616
Posts: 49444
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It appears that I need to use the same pins to connect two Arduinos together that are necessary for the barometer to work...
That is one way to connect two Arduinos. Serial and SPI are the other two. But, just as multiple devices can be connected to the SPI bus, so can multiple devices be connected to the I2C bus, as long as each has a different chip select pin (SPI) or address (I2C). The I2C device may have a fixed address; the Arduino can use any address.
Logged

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

Hmmm, well I also want to use the WiFi shield on one of the arduino's so SPI is also out of the question I suppose.  Would connecting via serial be accomplished via digital pins 0 and 1?  I've yet to find a wiring diagram and sketch example of this.  Do you know if one exists somewhere?
Logged

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

I suppose I could follow this example:  http://yayrobots.com/wordpress/?p=119

Though this example should only allow one Arduino to send a message to the other and not allow bi-directional traffic, correct?  I believe simply adding another cable between the two should allow for bi-directional traffic, no?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 616
Posts: 49444
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Hmmm, well I also want to use the WiFi shield on one of the arduino's so SPI is also out of the question I suppose. 
Why? The Ethernet shield also contains a SD card. Both are SPI devices, with different chip/slave select pins.

Quote
Would connecting via serial be accomplished via digital pins 0 and 1?  I've yet to find a wiring diagram and sketch example of this.
Yes. Possibly because connecting RX to TX, TX to RX, and Ground to Ground is so simple that no one thought is necessary to draw you a picture.

I find it hard to believe that you can't find a sketch that shows how to write to, or read from, the serial port.

Quote
I suppose I could follow this example
Maybe. Blocked as spam for me.

Quote
Though this example should only allow one Arduino to send a message to the other and not allow bi-directional traffic, correct?  I believe simply adding another cable between the two should allow for bi-directional traffic, no?
I don't know and yes.
Logged

Pages: [1]   Go Up
Jump to: