The XRP controller board includes a LSM6DSO 6-Dof IMU [datasheet]
"The LSM6DSO is a 6-axis IMU (inertial measurement unit) system-in-package featuring a 3-axis digital accelerometer and a 3-axis digital gyroscope"
The device is an example of a MEMS:
"MEMS (micro-electromechanical systems) is the technology of microscopic devices incorporating both electronic and moving parts."
The XRP firmware uses the IMU and the motor encoders to implement the "Drive Train ... Straight, Turn, Arcade" functions
Review: The Encoders
Let's look at the values of the IMU and Encoders to see how they change when we move the XRP.
Download and run this imu_test.blocks program. (Shown here --->)
Run the program and observe the sensor values as you manually move the XRP is various dimensions.
(turn left and right, tilt up/down/left/right, flip upside down)
Pick up the XRP a couple of inches from the table and gently drop it.
Can you associate all the motions with each of the sensor values?
(Hint: Look at the x,y,z graphic printed on the XRP controller board.)
Look at the generated Python code for this program.
Write a program that uses one or more of the sensor values some way.
You can use Blocks or Micropython.
Ideas:
Blink the LED and change blink rate in response to one of the sensor values.
(You'll need to do some math, or if/then/else code to map the sensor value to the number of blinks.)
Use the IMU to keep the servo arm horizontal as the XRP is tilted up and down.
Which works better -- the accelerometer or the gyroscope?
Detect when the XRP drives into a wall using the accelerometer.
In Python, use the OLED display to graphically indicate the left/right tilt to the XRP.
(Consider drawing a line and moving it left and right as the XRP is tilted.)
Your ideas?