Arduino101 陀螺仪

« 返回首页

Arduino101 陀螺仪

Arduino101 陀螺仪组件允许用户配置 Arduino 101 的板载陀螺仪,并通过适当的方法接收一个或多个陀螺仪样本。

更多链接:

属性

  • BluetoothDevice – 连接到Arduino 101的BluetoothLE组件。

get Arduino101Gyroscope1 BluetoothDevice

set Arduino101Gyroscope1 BluetoothDevice  to

方法

  • IsSupported – 检查当前通过BluetoothDevice属性连接的设备是否支持此功能。如果当前没有设备连接,此方法将始终返回false。

call Arduino101Gyroscope1 IsSupported

  • ReadGyroscopeData – 从Arduino读取单个陀螺仪数据样本。读取成功后,将触发GyroscopeDataReceived事件。

call Arduino101Gyroscope1 ReadGyroscopeData

  • RequestGyroscopeDataUpdates – 请求接收Arduino陀螺仪变化的通知。陀螺仪数据将通过GyroscopeDataReceived事件报告。

call Arduino101Gyroscope1 RequestGyroscopeDataUpdates

call Arduino101Gyroscope1 StopGyroscopeDataUpdates

事件

  • GyroscopeDataReceived – 当从Arduino 101接收到陀螺仪样本时触发GyroscopeDataReceived事件。这通常是执行读取请求操作的结果。X和Y角度以度为单位报告。

参数:

 * <code>X_Angle</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/math.html#number">_number_</a>) &mdash; 设备绕X轴旋转的角度,单位为度。
 * <code>Y_Angle</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/math.html#number">_number_</a>) &mdash; 设备绕Y轴旋转的角度,单位为度。

when Arduino101Gyroscope1 GyroscopeDataReceived X_Angle Y_Angle do

文档反馈