The ADXL343 breakout has the following pinout:
This breakout board can be run on 3.3V and 5V systems, although only the SCL and SDA lines are 5V safe (other pins like INT will need to be manually level-shifted by you).
- VIN - This is the input to the 3.3V voltage regulator, which makes it possible to use the 3.3V sensor on 5V systems. It also determines the logic level of the SCL and SDA pins. Connect this to 3.3V on the MCU for 3.3V boards (Adafruit Feathers), or 5.0V for 5V Arduinos (Arduino Uno, etc.).
- 3V3 - This is the OUTPUT of the 3.3V regulator, and can be used to provide 3.3V power to other parts of your project if required (<100mA).
- GND - Connect this to the GND pin on your development board to make sure they are sharing a common GND connection, or the electrons won't have anywhere to flow!
- SCL - The clock line on the I2C bus. This pin has an internal pullup resistor on the PCB, which is required as part of the I2C spec, meaning you don't need to add one externally yourself. This also functions as SCK in SPI mode.
- SDA - The data line on the I2C bus. This pin has an internal pullup resistor on the PCB, which is required as part of the I2C spec, meaning you don't need to add one externally yourself. This also functions as MOSI in SPI mode.
- STEMMA QT - These connectors allow you to connect to development boards with STEMMA QT connectors, or to other things, with various associated accessories.
- SDO/ALT ADDR - This pin can be used as MISO in SPI mode, but is more commonly used as an optional bit in the I2C bus address. By default this pin is pulled down, meaning it has a value of 0 at startup, which will results in an I2C address of 0x53. If you set this pin high (to 3.3V), and reset, the I2C address will be updated to 0x1D.
- CS: This dual purpose pin can be used as the chip select line in SPI mode, but also determines whether the board will boot up into I2C or SPI mode. The default of logic high sets the board up for I2C, and manually setting this pin low and resetting will cause the device to enter SPI mode. Please note that SPI mode is not actively support and the SPI pins are not all 5V safe and level shifted, so care will be required when using it!
- INT1 and INT2: There are two optional interrupt output pins on this sensor, which can be configured to change their state when one or more 'events' occur. For details on how to use these interrupts, see the Arduino/HW Interrupts page later in this guide.