Detect rotation but only on flat surface using Teensy motion prop shield

Hi,

I was looking for some advice. I have the Teesny 3.6 and the prop shield. It has a full range of motion sensors acceleration on all axis, gyro and magnetrometer.

https://www.pjrc.com/store/prop_shield.html

I want to read the heading, but also know if it has been picked up from a flat surface (such as a table).

The problem is, I can detect general movement, but need to distinguish between the heading rotation and lifting or not being on a flat surface.

Any advice and example codes from around the web would be appreciated. Not been able to find anything so far.

Cheers :slight_smile:

shapingthings:
The problem is, I can detect general movement, but need to distinguish between the heading rotation and lifting or not being on a flat surface.

I don't quite get that part...

lg, couka

Hi sorry... let me try again...

I want to detect the heading or rotation while the teensy is on a table, but not if it is picked up and moved around.

So I need to detect movement and distinguish between it being flat on a surface and up in the air (being held).

I hope that makes sense.

The accelerometer will detect movement and when held still, allow you to measure tilt. Look up "tilt sensing accelerometer".