Difference between revisions of "2. Panel display images"

From Banana Pi Wiki
Jump to: navigation, search
(Panel display image)
(The list of built-in images is as follows)
Line 11: Line 11:
  
 
==The list of built-in images is as follows==
 
==The list of built-in images is as follows==
 +
Image.HEART
 +
Image.HEART_SMALL
 +
Image.HAPPY
 +
Image.SMILE
 +
Image.SAD
 +
Image.CONFUSED
 +
Image.ANGRY
 +
Image.ASLEEP
 +
Image.SURPRISED
 +
Image.SILLY
 +
Image.FABULOUS
 +
Image.MEH
 +
Image.YES
 +
Image.NO
 +
Image.CLOCK12,
 +
Image.CLOCK11,
 +
Image.CLOCK10,
 +
Image.CLOCK9,
 +
Image.CLOCK8,
 +
Image.CLOCK7,
 +
Image.CLOCK6,
 +
Image.CLOCK5,
 +
Image.CLOCK4,
 +
Image.CLOCK3,
 +
Image.CLOCK2,
 +
Image.CLOCK1
 +
Image.ARROW_N,
 +
Image.ARROW_NE,
 +
Image.ARROW_E,
 +
Image.ARROW_SE,
 +
Image.ARROW_S,
 +
Image.ARROW_SW,
 +
Image.ARROW_W,
 +
Image.ARROW_NW
 +
Image.TRIANGLE
 +
Image.TRIANGLE_LEFT
 +
Image.CHESSBOARD
 +
Image.DIAMOND
 +
Image.DIAMOND_SMALL
 +
Image.SQUARE
 +
Image.SQUARE_SMALL
 +
Image.RABBIT
 +
Image.COW
 +
Image.MUSIC_CROTCHET
 +
Image.MUSIC_QUAVER
 +
Image.MUSIC_QUAVERS
 +
Image.PITCHFORK
 +
Image.XMAS
 +
Image.PACMAN
 +
Image.TARGET
 +
Image.TSHIRT
 +
Image.ROLLERSKATE
 +
Image.DUCK
 +
Image.HOUSE
 +
Image.TORTOISE
 +
Image.BUTTERFLY
 +
Image.STICKFIGURE
 +
Image.GHOST
 +
Image.SWORD
 +
Image.GIRAFFE
 +
Image.SKULL
 +
Image.UMBRELLA
 +
Image.SNAKE

Revision as of 00:36, 18 February 2019

Panel display image

Now that you know there's an LED matrix on the panel, you can use it to make a big story, because Python already gives you a lot of control over the display, so you can use it to create all sorts of interesting effects, and I'm sure this will be a good vehicle for artistic development.

  • Then before we get started on the project, you can see that Python already has a lot of built-in images, and if you want to display a smiley face, all you need to do is run the following code.
from microbit import *
display.show(Image.HAPPY)

Through the previous chapter, I think you should know the purpose of the first line, then the second line is refers to by the display module to display the built-in Image picture, we show the pattern of the smiling face is just part of the Image, and its name is Happy, and we will show through and placed it on the brackets, to make it, so as the display. just use display.show(Image.HAPPY), began to give it a try.

Emoj.jpg

The list of built-in images is as follows

Image.HEART Image.HEART_SMALL Image.HAPPY Image.SMILE Image.SAD Image.CONFUSED Image.ANGRY Image.ASLEEP Image.SURPRISED Image.SILLY Image.FABULOUS Image.MEH Image.YES Image.NO Image.CLOCK12, Image.CLOCK11, Image.CLOCK10,

Image.CLOCK9,
Image.CLOCK8, 

Image.CLOCK7, Image.CLOCK6,

Image.CLOCK5,
Image.CLOCK4,
Image.CLOCK3,
Image.CLOCK2,
Image.CLOCK1

Image.ARROW_N, Image.ARROW_NE, Image.ARROW_E, Image.ARROW_SE, Image.ARROW_S,

Image.ARROW_SW,
Image.ARROW_W,

Image.ARROW_NW Image.TRIANGLE Image.TRIANGLE_LEFT Image.CHESSBOARD Image.DIAMOND Image.DIAMOND_SMALL Image.SQUARE Image.SQUARE_SMALL Image.RABBIT Image.COW Image.MUSIC_CROTCHET Image.MUSIC_QUAVER Image.MUSIC_QUAVERS Image.PITCHFORK Image.XMAS Image.PACMAN Image.TARGET Image.TSHIRT Image.ROLLERSKATE Image.DUCK Image.HOUSE Image.TORTOISE Image.BUTTERFLY Image.STICKFIGURE Image.GHOST Image.SWORD Image.GIRAFFE Image.SKULL Image.UMBRELLA Image.SNAKE