You are here

Error message

Deprecated function: Function create_function() is deprecated in GeSHi->_optimize_regexp_list_tokens_to_string() (line 4698 of /var/www/diy-scib/sites/all/libraries/geshi/geshi.php).

KXM52-1050

Sensor Type: 
Acceleration
Connection: 
Analog
Features: 
3 - axis, +/- 2 G, 2.7-5.5V,

 

This three axis accelerometer is easy to interface. You just need three Analog inputs.

Unless you can do SMD, you will need to get it mounted in a module, such as Akizuki's module.

The following Arduino code will get you started:

/*
  simple_acceleration
  Reads three analog pins and prints to the serial monitor
 */
 
// pins
int Xpin = 3;
int Ypin = 4;
int Zpin = 5;
 
// readings
int Xval, Yval, Zval;
 
void setup() {
  Serial.begin(9600);
}
 
void loop() {
  Xval = analogRead(Xpin);
  Yval = analogRead(Ypin);
  Zval = analogRead(Zpin);
 
  Serial.print("X = ");
  Serial.print(Xval, DEC);
  Serial.print("  Y = ");
  Serial.print(Yval, DEC);
  Serial.print("  Z = ");
  Serial.println(Zval, DEC);
 
  delay(50);
}
Files: 
AttachmentSize
PDF icon KXM-52 datasheet92.55 KB

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer