lacanvas.blogg.se

Accelerometer adxl345 wire library code
Accelerometer adxl345 wire library code





accelerometer adxl345 wire library code

Requires specifying which event you are trying to read.įor specific usage examples, please refer to. Threshold defaults to 10, time defaults to 25.Įvents - Used to read the events when motion detection, tap detection and freefall detection are enables. Allows for single or double-tap detection.Įnable_freefall_detection - Enables freefall detection. Threshold defaults to 18.Įnable_tap_detection - Enables tap detection. In addition to reading the acceleration( accelerometer.acceleration), this library can also perform the following detections.Īcceleration - The acceleration values on the x, y and z axesĮnable_motion_detection - Enables motion detection. Relationship between output and gravity $ python3. Thus, when you rotate the module, you can see the changes of X_OUT, Y_OUT, and Z_OUT.

accelerometer adxl345 wire library code

No matter of face, as long as it’s placed on a level surface, X_OUT increases along the Ax axis direction, so does Y_OUT along the Ay axis. When you place the module face up, Z_OUT is at the maximum which is +1g face down, Z_OUT is at the minimum. Its high resolution (3.9 mg/LSB) enables measurement of inclination changes less than 1.0°.Ĭommunication Mode: Standard IIC/SPI communicating protocol It measures the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion or shock. The ADX元45 is well suited for mobile device applications. Digital output data is formatted as 16-bit twos complement and is accessible through either a SPI (3- or 4-wire) or I2C digital interface.

accelerometer adxl345 wire library code

The ADX元45 is a small, thin, ultralow power, 3-axis accelerometer with high resolution (13-bit) measurement at up to ☑6 g. SCL: Serial data (I2C), Serial data input (SPI line 4), Serial data input, output(SPI Line 3) SDA: Serial data (I2C), Serial data input (SPI line 4), Serial data input, output(SPI Line 3) SD0: Serial data output (SPI 4 wire), spare I2C address choose(I2C). VCC: The power supply is connected to 3-5V.







Accelerometer adxl345 wire library code