IMU::init()

Gyroscope initialization function

Example

This feature requires an upgrade to the latest SDK.

Use the uKit Explore v2 board to get the XYZ acceleration of the gyroscope every 400ms.

#include "uKitExplore2.h"
void setup() {    
    Initialization();    
    IMU::init();
}

void loop() {    
    IMU::read();    
    Serial.print("xAccel:");    
    Serial.print(IMU::getRawAccelX());    
    Serial.print(",yAccel:");    
    Serial.print(IMU::getRawAccelY());    
    Serial.print(",zAccel:");    
    Serial.println(IMU::getRawAccelZ());    
    delay(400);
}

Last updated