Arduino101 陀螺仪

« 返回首页

Arduino101 陀螺仪

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

更多链接:<ul><li>查看 Arduino 101 陀螺仪的示例项目。</li><li>查看 Arduino 101 陀螺仪的操作说明。</li></ul>

属性

  • BluetoothDevice – The BluetoothLE component with a connection to the Arduino 101.

get Arduino101Gyroscope1 BluetoothDevice

set Arduino101Gyroscope1 BluetoothDevice  to

方法

  • IsSupported – Check whether the feature is currently available for the device connected via the BluetoothDevice property. If no device is currently connected, this method will always return false.

call Arduino101Gyroscope1 IsSupported

  • ReadGyroscopeData – Read a single sample of gyroscope data from the Arduino. On successful read, the GyroscopeDataReceived event will be run.

call Arduino101Gyroscope1 ReadGyroscopeData

  • RequestGyroscopeDataUpdates – Request notifications of changes in the Arduino’s gyroscope. Gyroscope data will be reported through the GyroscopeDataReceived event.

call Arduino101Gyroscope1 RequestGyroscopeDataUpdates

  • StopGyroscopeDataUpdates – Stop receiving updates from the Arduino’s gyroscope. Note that there may be pending messages from the device that will still be reported through the GyroscopeDataReceived event. This method has no effect if RequestGyroscopeDataUpdates has not been previously called.

call Arduino101Gyroscope1 StopGyroscopeDataUpdates

事件

  • GyroscopeDataReceived – The GyroscopeDataReceived event is run whenever gyroscope samples are received from the Arduino 101. This is usually a result of performing a read or request operation. The X and Y angles are reported in degrees.

Parameters:

 * <code>X_Angle</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/math.html#number">_number_</a>) &mdash; The rotation of the device around its X axis, in degrees.
 * <code>Y_Angle</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/math.html#number">_number_</a>) &mdash; The rotation of the device around its Y axis, in degrees.

when Arduino101Gyroscope1 GyroscopeDataReceived X_Angle Y_Angle do

文档反馈