Arduino101 LED
Arduino LED 组件允许用户通过 App Inventor 项目控制发光二极管 (LED)。如果将 LED 插入支持脉冲宽度调制 (PWM) 的引脚,则可以通过改变 Intensity 属性来控制 LED 的亮度。TurnOn 和 TurnOff 方法用于控制 LED 的电源状态。
更多链接:<ul><li>下载 Arduino 101 LED 的示例项目。</li><li>查看 Arduino 101 LED 的操作说明。</li></ul>
属性
BluetoothDevice
– The BluetoothLE component with a connection to the Arduino 101.
Intensity
– The Intensity of the LED valued from 1-100. Intensity will only affect the brightness of the LED if it is plugged into a pin supporting pulse width modulation (PWM). For the Arduino 101, the PWM pins are 3, 5, 6, and 9. For all other pins the LED will either turn on or off with no change in intensity.
On
– Get whether the device attached to the Arduino 101 is turned on. This is a best guess approximation given the connected state of the Bluetooth low energy component and previous calls to TurnOn and TurnOff.
方法
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.