David M. Rieder
North Carolina State University
- 1 Arduino UNO microcontroller
- 1 ADXL 335 MEMS 3-axis accelerometer
- 1 Sainsmart Xbee Shield
- 2 Xbee PRO 60mW Wire Antenna (802.15.4), Version 1
- 1 SparkFun Xbee Explorer Dongle
- 1 Arduino-compatible, 5-pin stackable header
- 2 short lengths of 22-gauge AWD hook-up wire
- Solder, leaded or lead-free
- 1 USB A-B cable
- 1 9-volt to barrel jack adaptor
- 1 9-volt Duracell battery
- Paper for making folded origami boat
- Gaffer’s tape to secure Arduino beneath boat
- Arduino 1.6.6 IDE
- Processing 2.2.1 IDE
- Minim sound library
Constructing the wireless Arduino with attached accelerometer
- Solder the ADXL 335 accelerometer to a 5-pin stackable header
- Cut 2 short lengths of 22-gauge copper wire
- Place the end of one in GND
- Place the end of the other one in to the 3.3 volt power pin
- Place the Sainsmart shield on top of the Arduino UNO
- Place the accelerometer with solder-on header pins into the shield
- Place the other end of the two wires into SST and GND pins in the accelerometer break-out board
Once you’ve completed wiring together the wireless Arduino with accelerometer, plug it in to your computer and upload the code that I’ve provided using the Arduino IDE. When that is complete, construct the two Xbee radio transmitters.
- Put the first transmitter into the appropriate spot in the Sainsbury shield
- Put the other tranmitter in the Xbee Explorer dongle and plug it in to your lap- or desktop
The next step is to record the ranges of the X, Y, and Z dimensions of data streaming from the accelerometer.
- Open the Serial Monitor in the Arduino IDE. Type in _2 and hit enter. If you get a value back like the following, it is working properly: *321,290,330*
- Turn the accelerometer along each of its three dimensions and record the min and max values for each (you should have 2 x 3 values).
The next step is to open the Processing IDE and bring up the sketch.