Micro:bit Function Blocks

Functions are useful for packaging complex routines into reusable bug-free codes. They make your code clean and compact.

In computer programming, a function is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed.

Function may be defined within programs, or separately in libraries that can be used by many programs. In different programming languages, a subroutine may be called a procedure, a subroutine, a routine, a method, or a subprogram. The generic term callable unit is sometimes used.

Click the Microbit function icon

Click the “Make a Function”

Enter function name and pick function parameters

Call a Function

Choose the created functions from Microbit Function Section

Function Example