How do I use ADXL345 Nodemcu?

How do I use ADXL345 Nodemcu?

adxl345. read()

  1. Syntax. adxl345.read()
  2. Returns. X,Y,Z data (integers)
  3. Example. local sda, scl = 1, 2 i2c.setup(0, sda, scl, i2c.SLOW) — call i2c.setup() only once adxl345.setup() local x,y,z = adxl345.read() print(string.format(“X = %d, Y = %d, Z = %d”, x, y, z)) adxl345.
  4. Syntax. adxl345.setup()
  5. Parameters. None.
  6. Returns. nil.

What is accelerometer ADXL335?

The ADXL335 is a small, thin, low power, complete 3-axis accelerometer with signal conditioned voltage outputs. The product measures acceleration with a minimum full-scale range of ±3 g. The user selects the bandwidth of the accelerometer using the CX, CY, and CZ capacitors at the XOUT, YOUT, and ZOUT pins.

Where can I find more information about adxl345?

More detailed information of the sensing functions and interrupts can be found on the ADXL345 Datasheet. The main example code was kept very simple. It focuses on not only reading the accelerometer values but also checking to see if any interrupts have occurred.

Is the adxl345 an I2C or SPI device?

Serial Data I2C / Serial Data Input (SPI 4-WIRE) / Serial Data Input and Output (SPI 3-Wire) With the ADXL345, I2C and SPI digital communications are available. In both cases, the ADXL345 operates as a slave device.

What is the SparkFun adxl345 logic level converter I?

The ADXL345 is a small, thin, low power, 3-axis MEMS accelerometer wi… SparkFun Logic Level Converter – Bi-Directional BOB-12009 If you’ve ever tried to connect a 3.3V device to a 5V system, you know what a challenge it can be. The SparkFun bi-directional logic level converter i…

Is the adxl345 breakout compatible with Arduino?

In both cases, the ADXL345 operates as a slave device. Note: A potential problem when hooking up the ADXL345 breakout to an Arduino (or compatible board) is, if you are using a breadboard with loosely connected jumper wires, you risk getting bad data. Make sure your connections are solid, and you should be fine.