The Arduino LED component lets users control light-emitting diodes (LEDs) from their App Inventor projects. If the LED is plugged into a pin supporting pulse width modulation (PWM), then the LED's brightness can be controlled by varying the Intensity property. TurnOn and TurnOff methods are used to control the power state of the LED.
More Links:
Properties
⦁
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.
⦁
Pin
– The Pin on the Arduino board that the device is wired in to.Methods
⦁
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.
⦁
TurnOff
– Turn off the connected device.
⦁
TurnOn
– Turn on the connected device.
댓글 없음:
댓글 쓰기