Welcome to the world of imagilib
where Python meets colors, pixels, and a lot of fun! π π€ π©βπ» π± Brought to you by imagi.
You'll see the following emojis next to each section that tell you the (difficulty) level of the learning content:
Adventurer π
Challenger π΅οΈ
imagilib
is a unique library or a collection of variables and functions that you can use when you are programming in the imagi app. In addition to imagilib
, some standard Python libraries can also be used in the our app, for example: random
, math
, and datetime
. You can read in more detail about how to use all these libraries, variables and functions below.
Legendary π©βπ»
imagilib
This section documents the objects and functions in the imagilib
module.
imagilib
is a PythonΒ library that contains all the predefined variables, functions and classes that can be used in the imagi app coding environment (code editor). The imagilib
library is imported into each coding project so that the objects and functions are available from the start.
Here is a list of the variables that can be used:
m
is our matrix of pixels that we can program to turn on
or off
or even in different colors. It is an array of 64 pixels, arranged in 8 rows and 8 columns. Each element or pixel of the matrix can be accessed using a row and a column index.
blink_rate
is a variable that can be used to create a blinking effect. When blink_rate = 0
there is no blinking. If blink_rate > 0
, the design in m
will blink at a rate of blink_rate
number of times per second. blink_rate
supports fractional values and the maximum is 3.