User:Sarah Labianca/Notebook/Smyth Lab/2012/04/05

From OpenWetWare

Jump to: navigation, search
Project name Main project page
Previous entry      Next entry

Downloads

to be filled in with libraries, code, etc, later

Building a force gauge

About the ADXL345 and Arduino

Background reading on accelerometers. Our accelerometer of choice was the ADXL 345 from SparkFun Electronics. There are a bunch of code examples for the ADXL345, and the datasheet and quickstart guide were very helpful. The board we used to control and process data from the ADXL345 was an Arduino Uno R3.

Circuit

I connected the ADXL to the Arduino using a relatively simple circuit. I used the circuit setup from a bildr tutorial. The accelerometer came mounted on a breakout board, with holes where pins could go. I had to solder pins onto the breakout board

  • Arduino 3.3 v is connected to ADXL VCC and CS
  • Arduino ground is connected to ADXL ground
  • Arduino Analog In 4 (A4) is connected to ADXL SDA
  • Arduino Analog In 5 (A5) is connected to ADXL SCL

Development Environment

I wrote and uploaded my code to the Arduino and accelerometer using the Arduino 1.0 IDE on Ubuntu 11.04. Help for getting the integrated development environment running on Ubuntu can be found here. The language is very similar to C.

ADXL345 and Arduino 1.0 IDE

init.h



Personal tools