connecting multiple sensors and arduinos

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
roop
 
Posts: 19
Joined: Fri Feb 04, 2011 2:31 pm

connecting multiple sensors and arduinos

Post by roop »

I recently purchased an accelerometer, ADXL326, a magnetometer, Sparkfun HMC 5883L, a GPS Log shield Kit v1.1 (adafruit), a pressure sensor (BMP 085), two xbee transmitters, and a couple of Arduino UNO R3s.

We want to connect all of these at the same time for an amateur rocket launch project at our community college. Problem is that all of the circuits both from Adafruit and the Arduino Cookbook show the use of inputs 5 and 6 for connecting the sensors (with the exception of the acclerometer) to the arduino UNO or for connecting two arduinos together.

We also want to log the sensor data, TM some of it, and in parallel, run a calculation using the data as fast as possible. We don't know what type of connections would be better I2C or SPI or some other type of connection.

Any guidance or suggested resources or sketches and examples would be greatly appreciated.

Roop

User avatar
microguy
 
Posts: 16
Joined: Tue Sep 25, 2012 4:39 pm

Re: connecting multiple sensors and arduinos

Post by microguy »

First you want to set up the XBee modules to communicate and test that the communications work. You can set the transmitting XBee module to take a reading of all sensor inputs and transmit them. In the transmitting module, set IT (Samples before TX) to 1 (one), so you gather one sample and transmit it. Then set IR (Sample Rate) value to the number of milliseconds between samples. Keep the IR value above 20 milliseconds. Your receiving module will provide the "ground station" with serial data that represents the values from your sensors.

See the excellent book, "The Hands-on XBee Lab Manual," by Jon Titus for all you want to know about how to use sensors, transmit data, and interpret the data. Very good book. Amazon has it.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”