Approved content
The content below is provided by a partner.
Displaying numbers on the micro:bit screen as on the soroban abacus. This allows the user to display a 5 digit number on the screen. It’s also much faster than displaying normal number:
basic.showNumber(9)
- takes about 760 mssoroban.showNumber(9)
- takes about 1 msbasic.showNumber(25)
- takes about 2657 mssoroban.showNumber(25)
- takes about 1 msbasic.showNumber(3.141)
- takes about 4458 mssoroban.showNumber(3.141)
- takes about 1 ms Soroban: https://en.wikipedia.org/wiki/Soroban
- - - - - + + + + + - -
- + + + + - + + + + - -
- - + + + - - + + + + -
- - - + + - - - + + - -
- - - - + - - - - + - +
0 1 2 3 4 5 6 7 8 9 - .
Displays number as on the soroban abacus.
soroban.showNumber(3.14)
number
- the numberalignment
- align to the given column, by default align rightrefresh
- specify whether the screen should be cleared before displaying number, by default truesoroban.showNumber(12345)
Copyright (C) 2021 Adam Orczyk
Licensed under the MIT License (MIT). See LICENSE file for more details.
Soroban=github:aorczyk/soroban#v1.0.11