Looking for Arduino sketch: Accelerometer BMA180 and/or BMA020

Hello,
I am new in the field of interfacing sensors to an Arduino Uno: To do "learning by doing" ... who might give me a simple Arduino sketch to read the Bosch 3-axis accelerometers BMA180 and if possible also for BMA020 by TWI (I2C) interface ... ? Thanks a lot for the help ... ! :slight_smile:

Read this:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1276427322

For more, just google arduino bma180

This is a code for an AXDL335, not sure how different they are. Hope it helps.

void setup()
{
Serial.begin(9600);
}

void loop()
{
int xaccel = analogRead(0);
int yaccel = analogRead(1);
int zaccel = analogRead(2);
unsigned long timevar = millis();

Serial.print(timevar);
Serial.print(" "); Serial.print(xaccel);
Serial.print(" ");
Serial.print(yaccel);
Serial.print(" ");
Serial.println(zaccel);
}

This is a code for an AXDL335, not sure how different they are

I think the clue is in "TWI / I2C"