Go Down

Topic: Looking for Arduino sketch: Accelerometer BMA180 and/or BMA020 (Read 2684 times) previous topic - next topic

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 ... ! :)

Senso

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

For more, just google arduino bma180

hscriber

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);
}

AWOL

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

I think the clue is in "TWI / I2C"
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up