_api.motionsensor – motion sensor functions API¶
This module contains the API functions for user interaction with the motion sensor inside the Hub.
This module is imported by the mindstorms – Mindstorms branding of the user API and spike – Spike Prime branding of the user API modules so that the API can be branded appropriately in documentation (i.e. so that Mindstorms docs can tell you to import mindstorms, and Spike Prime docs can tell you to import spike).
MotionSensor Class¶
- class _api.motionsensor.MotionSensor(???)¶
???
Methods
- get_pitch_angle(???)¶
???
- get_roll_angle(???)¶
???
- get_yaw_angle(???)¶
???
- get_orientation(???)¶
???
- get_gesture(???)¶
???
- reset_yaw_angle(???)¶
???
- was_gesture(???)¶
???
- wait_for_new_orientation(???)¶
???
- wait_for_new_gesture(???)¶
???
Constants
- FALLING = falling¶
???
- SHAKEN = shaken¶
???
- TAPPED = tapped¶
???
- DOUBLE_TAPPED = doubletapped¶
???
- LEFT_SIDE = leftside¶
???
- RIGHT_SIDE = rightside¶
???
- FRONT = front¶
???
- BACK = back¶
???
- UP = up¶
???
- DOWN = down¶
???
Imports¶
Function
utime.sleep_ms