Does anyone know or have some accelerometer or gyroscope examples?
Hi, and welcome, @Night_Lee!
Sure! Check this page out.
There isn’t a gyro in the sensor expansion board, but that page has example readings from the accelerometer, as well as example code for detecting shaking.
I’ll also point you to a pattern I saw in Roger Cheng’s excellent Glowflow that orients a 3D pattern according to the vector it senses for gravity (and other acceleration).
v2 of the sensor board needs a gyroscope