This library helps communicate with the already setup Easy IMU with arduino microcontroller projects via I2C
you can use it in your Arduino-based robotics project (e.g Arduino UNO, Arduino NANO, Arduino MEGA, Esp32, etc.)
A simple way to get started is simply to try out and follow the example code
-
Ensure you have the
Easy IMU -
Download download the library by clicking on the green Code button above (or clone it)
if you download it, extract it and change the folder name to
epmc_arduino -
Move the downloaded library file to your Arduino library folder
e.g on linux: ... home/Arduino/libraries/
e.g on windows: ... Documents/Arduino/libraries/
(or any where your arduino libraries are stored)
-
restart your ArduinoIDE and navigate to examples and run the example code and see how to control the motors.
-
you can copy this example code into your project and modify it to your taste.
-
connect to epmc_driver shield module
EIMU eimu(i2c_address)
.readQuat(float &w, float &x, float &y, float &z); .readRPY(float &x, float &y, float &z); .readAccGyro(float &ax, float &ay, float &az, float &gx, float &gy, float &gz);
.readLinearAcc(float &x, float &y, float &z); .readGyro(float &x, float &y, float &z); .readMag(float &x, float &y, float &z);
.readRPYVariance(float &x, float &y, float &z); .readAccVariance(float &x, float &y, float &z); .readGyroVariance(float &x, float &y, float &z);
.setWorldFrameId(int); .getWorldFrameId(); .getFilterGain(); .clearDataBuffer();