Simple test

Ensure your device works with this simple test.

examples/adxl37x_simpletest.py
 1# SPDX-FileCopyrightText: Copyright (c) 2022 Kattni Rembor for Adafruit Industries
 2#
 3# SPDX-License-Identifier: Unlicense
 4import time
 5import board
 6import adafruit_adxl37x
 7
 8i2c = board.I2C()  # uses board.SCL and board.SDA
 9# i2c = board.STEMMA_I2C()  # For using the built-in STEMMA QT connector on a microcontroller
10accelerometer = adafruit_adxl37x.ADXL375(i2c)
11
12while True:
13    print("%f %f %f m/s^2" % accelerometer.acceleration)
14    time.sleep(0.2)