2017년 7월 4일 화요일

Arduino101Led


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:
⦁ Download a sample project for the Arduino 101 LED.
⦁ View the how to instructions for the Arduino 101 LED.

Properties

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

get Arduino101Led1 BluetoothDevice
set Arduino101Led1 BluetoothDevice  to
⦁ 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.
get Arduino101Led1 Intensity
set Arduino101Led1 Intensity  to
⦁ 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.
get Arduino101Led1 On
⦁ Pin – The Pin on the Arduino board that the device is wired in to.
get Arduino101Led1 Pin
set Arduino101Led1 Pin  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.

call Arduino101Led1 IsSupported
⦁ TurnOff – Turn off the connected device.
call Arduino101Led1 TurnOff
⦁ TurnOn – Turn on the connected device.
call Arduino101Led1 TurnOn


댓글 없음:

댓글 쓰기