Laurens Valk 20fec6461a api/_common/LightGrid: make image more efficient
Usually, images are static, so they can be computed in advance instead of during runtime. This makes scripts smaller and much more memory efficient.

For example, now you can say:

HOUSE = 4685823

hub.grid.image(HOUSE)

since 4685823 =
```
0 0 1 0 0
0 1 1 1 0
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
```

We could also choose the binary format to allow for more generic screen sizes. If we allow a bit more space (2 words instead of 1), we could do 1 byte per row to allow screens up to 8x8. Right now, though, we choose 1 word < 31 bits which is a bit more efficient in MicroPython.

We can easily list numerous example in the docs or provide a simple visual calculator.

There is still a matrix method that takes a 2D matrix of intensities for full control during runtime, which is what the image() method was doing initially. This commit renames the old draft to matrix().
2020-07-07 09:44:16 +02:00
2020-07-01 13:33:36 +02:00
2020-04-08 10:01:43 +02:00
2020-03-18 17:30:42 -05:00
2020-04-08 10:01:43 +02:00
2020-03-13 09:45:29 -05:00
2020-03-05 10:33:48 +01:00
2020-03-18 17:30:42 -05:00
2020-06-17 13:04:06 -05:00
2020-03-18 17:30:42 -05:00
2020-03-18 17:30:42 -05:00

Pybricks end-user API & Documentation
=====================================

This repository documents the Pybricks end-user MicroPython API.

Each `Pybricks firmware`_ comes with the `Pybricks package`_. All modules,
classes, methods, and functions in that package have optimized implementations
in C for high performance and reduced memory footprint.

This repository provides an empty, pure Python blueprint of that package. It is
used to generate the `official documentation`_.
See the `contributor's guide <CONTRIBUTING.md>`_ for acceptable changes and
instructions to build the documentation locally.

For general discussion, please visit the `support`_ issue tracker.

.. _Pybricks package: pybricks
.. _Pybricks firmware: https://github.com/pybricks/pybricks-micropython
.. _official documentation: https://docs.pybricks.com/
.. _support: https://github.com/pybricks/support/issues
S
Description
User API and documentation for Pybricks MicroPython
Readme MIT
38 MiB
Languages
Python 99.1%
Shell 0.9%