Go Down

Topic: Looking for Arduino sketch: Accelerometer BMA180 and/or BMA020 (Read 2751 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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy