The Magic Wand Example

Introduction

The magic wand example shows how to detect gestures using an accelerometer. Different types of accelerometers are easily available:

lis3dh.png

I mounted the accelerometer onto a WeMos D1 prototype board. With the triple base and the CPU this makes up for a stable assembly that can easily be moved without cable contact problems.

mpu6050assembly.png

Hardware connections

The MPU6050 is connected to the WeMos D1 bus as follows:

MPU6050 WeMos D1 bus GPIO
Vcc 5V  
GND GND  
SCL D1 22
SDA D2 21
INT D0 26
XDA and XCL are foreseen to control an external I2C bus, These pins are currently not used. AD0 allows to modify the MPU6050 I2C address and is also not used.

The ADXL345 is connected as follows:

ADXL345 WeMos D1 bus GPIO
Vcc 5V  
GND GND  
SCL D1 22
SDA D2 21
INT1 D6 19
INT2 D5 18

Providing a training data set

In order to provide a training data set we must be able to record gestures. We must therefore provide a program that recognizes the start and the end of a gesture (movement and inactivity detection) and which records the accelerometer data of the gesture onto a file. Gesture detection is of course also needed to be able to feed the accelerometer data into the trained model, which will then recognize the gesture.

-- Uli Raich - 2022-02-02

Comments

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng adxl345.png r1 manage 173.4 K 2022-02-04 - 11:08 UliRaich  
PNGpng lis3dh.png r2 r1 manage 178.0 K 2022-02-14 - 09:08 UliRaich  
PNGpng mpu6050.png r3 r2 r1 manage 159.6 K 2022-02-04 - 11:21 UliRaich  
PNGpng mpu6050assembly.png r2 r1 manage 243.2 K 2022-02-04 - 11:24 UliRaich  
Edit | Attach | Watch | Print version | History: r12 | r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r6 - 2022-02-21 - UliRaich
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback