Triple Axis Accelerometer MMA7361

Specification Voltage:3.3-8V Selectable sensitivity:±1.5g/6g Low power:500μA @ measurement mode,3μA @standby ; High sensivity: 800 mV/g @ 1.5g; Interface:Analog Output Low pass filter Size:23x26mm Weight: 5 gram Anschluss an Arduino  bild folgt x=0 y=1 z=2 void setup() { Serial.begin(57600); } int analog_x,analog_y,analog_z; float vol_x,vol_y,vol_z; float add_x,add_y,add_z; float g_x,g_y,g_z; float degree_x,degree_y,degree_z; void loop() { analog_x=analogRead(0); analog_y=analogRead(1); analog_z=analogRead(2); vol_x=analog_x*5.0/1024;//convert analog_x–>voltage value(v) vol_y=analog_y*5.0/1024; vol_z=analog_z*5.0/1024; //range x: 0.83 – 2.41 1.62 // y: 0.96 – 2.53 1.74 // z: 0.72 – 2.23 1.48 add_x=vol_x-1.62;//calculate the

Weiterlesen