* See the bottom of this file for the license terms. The Accelerometer data is refreshed every 5 seconds. This sketch is the simplest possible and doesn't include any calibration. The formula of the function must be adjusted to match the accelerometer range set with setAccelerometerRange. Functionsįloat convertRawAcceleration(int aRaw) - transforms the raw data read from the accelerometer (aRaw) into a value expressed in mg (thousandths of g). In this tutorial we read the raw accelerometer values. This example uses the on-board IMU to start reading acceleration and gyroscope data from on-board IMU, once enough samples are read, it then uses a TensorFlow Lite (Micro) model to try to classify the movement as a known gesture. This library is part of the 101 board core and it is loaded together with the core files for Arduino 101. This unit contains a three axes accelerometer and a three axes gyroscope. Software Essentials LibrariesĬurieIMU.h is the library that gives access to all the parameters, features and readings of the IMU chip of the 101 board. ![]() No additional hardware is needed to use this tutorial. ![]() The result of the conversion is printed on the Serial monitor as triplets of acceleration values (X, Y and Z). ![]() Each axis measures the acceleration within a range defined by a specific function - setAccelerometerRange - and returns a raw value that needs to be converted to get a value in mg. With this tutorial you learn to read the three axes of the accelerometer contained in the IMU (Inertial Measurement Unit) of the 101 board.
0 Comments
Leave a Reply. |