Arduino101RgbLcd
Arduino 101 RGB LCD 让用户在带有可选 RGB LED 背光的液晶显示器 (LCD) 上传达信息。
注意:RGB LCD 显示器需要 5V 电源而不是 3.3V。如果您将其与 Grove Shield 连接,则需要确保电压开关处于 5V 位置,否则显示屏可能无法正常工作。
更多链接<ul><li>下载示例项目。</li><li>查看 RGB LCD 的操作说明。</li></ul>
属性
BluetoothDevice
– The BluetoothLE component with a connection to the Arduino 101.
方法
GetBackgroundColor
– Request the current background color from the device. The color will be returned through the <a href=’#BackgroundColorReceived”>BackgroundColorReceived
</a> event.
GetText
– Get the text currently shown on the screen. The text will be returned through theTextReceived
event.
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.
SetBackgroundColor
– Set the background color of the RGB LCD connected to the Arduino 101. This method can take any of the color blocks or a color composed using the make a color block. The RGB LCD does not have the same range of colors as a computer screen, so you may not observe changes between similar colors.
Parameters:
* <code>color</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/colors.html#basic">_color_</a>) —
The color to change the background color to.
SetText
– Set the text of the display. Text is limited to string with not more than 2 lines of 16 characters each. If a line is longer than 16 characters, it will be truncated.
Parameters:
* <code>text</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/text.html#string">_text_</a>) —
The text to show on the LCD. This is limited to two 16-character strings separated by a newline "\n"
事件
BackgroundColorReceived
– TheBackgroundColorReceived
event is run when the background color information is successfully received from the Arduino 101.
Parameters:
* <code>color</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/colors.html#basic">_color_</a>) —
The current color of the background.
TextReceived
– TheTextReceived
event is run when the text currently displayed on the RGB LCD is received from the Arduino 101 in response to a call toGetText
.
Parameters:
* <code>text</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/text.html#string">_text_</a>) —
The text currently being shown on the RGB LCD. Note that this may not match the
characters being shown due to a limited range of Unicode support for the LCD.