S05ADXL345
Accel 3-Axis
Feels tilt, shakes and taps in all three directions.
Loading 3D
Drag to orbit · scroll to zoom · double-click to reset
Scan the back of the board to open this page.builtbytyler.com/S05
Try it
Tilt and shake the board
x=0.02 y=0.01 z=1.00 gx=0.71 y=0.03 z=0.70 gx=-0.50 y=0.86 z=0.02 gTAP detected
3-axis +/-2/4/8/16 g accelerometer over I2C (0x53). Tap, free-fall and activity interrupts on INT.
/*
BuiltByTyler Sensor Kit - S05 ACCEL 3-AXIS (ADXL345)
Board: ESP32-WROOM-32 DevKit V1 (30-pin), Arduino-ESP32 core 3.x, "ESP32 Dev Module"
Prints X, Y and Z acceleration in g, 5 times a second.
Flat on the table you should see about z=1.00 g (that's gravity).
I2C address 0x53. INT is optional (tap / free-fall) and not used here.
Wiring (module pin -> ESP32 pin):
GND -> GND
VCC -> 3V3
SDA -> GPIO 21
SCL -> GPIO 22
INT -> GPIO 4
Library: "Adafruit ADXL345" (also installs "Adafruit Unified Sensor") (Sketch > Include Library > Manage Libraries)
Serial Monitor: 115200 baud
*/
#define SDA_PIN 21
#define SCL_PIN 22
#define INT_PIN 4
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_ADXL345_U.h>
Adafruit_ADXL345_Unified accel = Adafruit_ADXL345_Unified(12345);
void setup() {
Serial.begin(115200);
Wire.begin(SDA_PIN, SCL_PIN);
if (!accel.begin(0x53)) {
Serial.println("ADXL345 not found at 0x53 - check the wiring");
while (true) delay(1000);
}
accel.setRange(ADXL345_RANGE_4_G); // +/-4 g is plenty for tilting and shaking
}
void loop() {
sensors_event_t e;
accel.getEvent(&e); // results come in m/s^2
const float G = 9.80665; // 1 g in m/s^2
Serial.printf("x=%.2f y=%.2f z=%.2f g\n",
e.acceleration.x / G, e.acceleration.y / G, e.acceleration.z / G);
delay(200);
}
Not for sale yet. Planned price $79, shipping included. Join the waitlist and we'll email you once when the kit is ready. Nothing else.