Arduino101 湿度传感器

« 返回首页

Arduino101Moisture 湿度传感器

Arduino 101 湿度传感器允许用户从连接到 Arduino 的湿度传感器接收数据,但它也可以用于任何基于某些外部现象提供线性模拟信号的类似设备。

更多链接<ul><li>下载 Arduino 101 湿度传感器的示例项目。</li><li>查看 Arduino 101 湿度传感器的操作说明。</li></ul>

属性

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

get Arduino101Moisture1 BluetoothDevice

set Arduino101Moisture1 BluetoothDevice  to

  • Pin – The Pin on the Arduino board that the device is wired in to.

get Arduino101Moisture1 Pin

set Arduino101Moisture1 Pin  to

方法

  • IsSupported – Tests whether the Bluetooth low energy device is broadcasting support for the service. If true, calls to TurnOn and TurnOff should work correctly. Otherwise an error will be reported through the Screen’s ErrorOccurred event.

call Arduino101Moisture1 IsSupported

  • ReadMoisture – Obtain the most recent reading from the moisture sensor as reported by the Arduino. On success, the MoistureReceived event will be run.

call Arduino101Moisture1 ReadMoisture

  • RequestMoistureUpdates – Request notification of updates for the moisture sensor attached to the Arduino 101. The MoistureReceived event will be run as moisture sensor readings are received from the Arduino.

call Arduino101Moisture1 RequestMoistureUpdates

  • StopMoistureUpdates – Stop listening for notifications of moisture sensor readings from the ARduino. This only has an effect if there was a previous call to RequestMoistureUpdates. There may be additional pending messages that will be processed after this call.

call Arduino101Moisture1 StopMoistureUpdates

事件

  • MoistureReceived – The MoistureReceived event is run when a moisture measurement is received from the moisture sensor attached to the Arduino 101.

Parameters:

 * <code>moisture</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/math.html#number">_number_</a>) &mdash; The moisture level measured, between 0 and 100.

when Arduino101Moisture1 MoistureReceived moisture do

文档反馈