Skip to content

Latest commit

 

History

History
52 lines (27 loc) · 2.76 KB

english_document.md

File metadata and controls

52 lines (27 loc) · 2.76 KB

MicroPython - Display

Hardware introduction:

LED Matrix Display

LED Matrix Hardware correlation function display Modular. Before calling related functions, you need to import the corresponding libraries.

Display scrolling text

The LED panel of bpi: bit uses programmable RGB lamp (ws2812b), which can theoretically display 255 * 255 * 255 * 255 colors, or 16 million colors, by programming.

Main functions

  • display.scroll(val, color=Red, delay=150)

For example: display.scroll("Hello World!",color=Yellow,delay=200) Scroll over the LED matrix to display the Yellow "Hello World!" string with a scrolling interval of 200 ms.

Panel Display Image

The display of images is due to the different states of each LED lamp on and off, color and brightness on the LED matrix. As long as the state of different LED lights is controlled, the desired image can be formed. The image is made up of a list, in which the values of 1 (bright) or 0 (dark) are assigned according to the order of LED lights, respectively, to display the image.

Main functions

  • display.show(images, loop, delay):

For example: display.show(Image.ALL_CLOCKS, loop=True, delay=100) In the LED matrix, the clock is displayed by the brightness and extinction of the led. The clock is played back and forth with a change interval of 100 ms.


Example

  1. show_text.py -Display simple text
  2. display_yellow_text.py -Show Simple Text Show Yellow Text
  3. display_color_text.py -Display multicolor text
  4. display_custom_color.py -Display multicolor text to display custom color text
  5. show_image.py -Display built-in images
  6. show_my_image.py -Display custom images
  7. show_clock.py -Display built-in animation
  8. show_animation.py -Display custom animation