Get the roll angle Φ (roll): the angle of rotation around the X axis.
Last updated 5 years ago
Was this helpful?
Parameters
Type
Description
number
float
Roll angle Φ (roll): the angle of rotation around the X axis
This feature requires an upgrade to the latest .
Use the uKit Explore v2 board to get the roll and pitch angle of the gyroscope and display it every 400ms to the serial monitor.
#include "uKitExplore2.h" void setup() { Initialization(); IMU::init(); } void loop() { IMU::read(); Serial.print("Roll:"); Serial.print(IMU::getRoll()); Serial.print(",Pitch:"); Serial.println(IMU::getPitch()); delay(400); }