Microbit_Magnetometer 可用於設定BBC micro:bit開發板上的磁力感測器,並接收單筆或多筆磁力讀數。
屬性BluetoothDevice – 連接至micro:bit 裝置之BluetoothLE元件。


方法






WriteMagnetometerPeriod – 本方法可設定micro:bit發送磁力感測器資料給App Inventor的時間間隔。period單位為毫秒。根據micro:bit原廠文件,可用的參數有1, 2, 5, 10, 20, 80, 160與640(毫秒)。
參數: Magnetometer_Period (數字) — 所要設定的磁力感測器讀取速度,單位為毫秒。

事件



|
|