Commit Graph
32 Commits
Author SHA1 Message Date
Laurens Valk 8a6ddf677c pybricks.pupdevices.Remote: Light examples. 2021-08-05 14:56:00 +02:00
Laurens Valk 62bb262b96 pybricks.pupdevices.Remote: Add more examples. 2021-07-28 14:50:43 +02:00
Laurens Valk 72e0d87f77 ubuiltins: Examples for common exceptions. 2021-07-21 14:53:56 +02:00
Laurens Valk e8d47ffca1 uerrno: Document alongside OSError.
These are meant to be used together, so document them in the same place along with a practical example.
2021-07-19 15:03:10 +02:00
Laurens Valk 3b1fd091f1 micropython: Add examples for memory stats. 2021-07-14 16:08:52 +02:00
Laurens Valk 4c00c3209b micropython.const: Improve docstring, add example.
This merges the useful information from two different places:
- The original docstring for const.
- Writing MicroPython code for constrained devices.

Also reduce type to just int, because only ints are supported.
2021-07-14 14:48:59 +02:00
Laurens Valk a0e4ffdb5c umath: Use umath for math.
Do this for all Powered Up examples.
2021-07-14 11:22:04 +02:00
Laurens Valk 9b8a66e3da pybricks.hubs.PrimeHub: Add system examples. 2021-07-14 09:43:34 +02:00
Laurens Valk 5a8baeff4c pybricks.hubs: Add system examples. 2021-07-07 09:58:51 +02:00
Laurens Valk f8cd3451ea pupdevices.Remote: Enable it.
Also add an example.
2021-06-30 17:14:25 +02:00
Laurens Valk 3b20a811cb examples/pup/motor_dc: Add battery box example. 2021-05-21 14:00:57 +02:00
David Lechner 3dad15ac11 examples: fix use of OSError
We generally shouldn't be raising OSError from user code since it
represents an error the bubbles up from the OS. Also, when handling
an OSError, we almost always want to check for a specific error code.
2021-04-29 09:38:16 -05:00
Laurens Valk 790fcfa66a examples/pup/iodevices: Add PUPDevice example. 2021-04-29 13:03:34 +02:00
Martyn Boogaarts 7ce3721b48 examples/pup/hub_shared: Update light animation examples.
See https://github.com/pybricks/support/issues/253

* Update light_animate.py

corrected syntax

* Update light_animate.py

corrected syntax

* Update light_animate.py

corrected syntax

* Update light_animate.py

corrected syntax
2021-04-24 21:36:10 +02:00
Laurens Valk ca96ee2fce examples: Update detectable colors API. 2021-04-10 15:31:28 +02:00
Laurens Valk e91590feec examples/pup/sensor: Fix use of lights.on.
The documentation says to use a list or tuple of brightness values.

https://github.com/pybricks/support/issues/273

Implementation fixed via https://github.com/pybricks/pybricks-micropython/commit/28b5413c2b41283a5c1ea3e8cccf4a2900dd7fc3
2021-04-09 15:44:08 +02:00
Laurens Valk 7679b8b47d examples/hubs/MoveHub: imu examples 2021-02-17 23:31:19 +01:00
Jorge Pereira 109fcf19c1 examples/pup/motor: update motor_action_basic
Demo of run_angle had a typo
2021-02-14 13:54:58 +01:00
Laurens Valk 3c6ebd09bd doc/parameters/Color: add examples 2021-02-12 10:53:40 +01:00
ZPhilo 2a1640f7dc examples/pup/hubs/hub_primehub: fix button
Corrected Bluetooth button name (from BT to BLUETOOTH)
2021-01-28 09:31:41 +01:00
Laurens Valk 55d7a8a254 examples/pup: acceleration and angular velocity 2021-01-20 16:02:36 +01:00
Laurens Valk e051455e23 examples/pup: add imu tilt examples 2021-01-20 14:55:27 +01:00
Laurens Valk 4b5b97bbb2 examples/pup: add imu up() example 2021-01-20 11:13:24 +01:00
Laurens Valk 1573508f75 examples/pup/primehub: auto rotate display 2021-01-20 11:05:09 +01:00
Laurens Valk 018b0d8b9d examples: simplify hub script generator
Instead of saying that some lines should be skipped, just say for which hubs the entire script will work.
2021-01-20 10:56:21 +01:00
Laurens Valk 47d7fa46d8 examples: drop common inventorhub scripts
The doc page has been merged into one page, with all examples using the PrimeHub class.
2021-01-20 10:40:26 +01:00
Laurens Valk 92311b65fb examples/pup/hub_primehub: no need to call off()
The animation is now cleared automatically when invoking the pixel method, so there's no need to call this manually anymore.

See https://github.com/pybricks/support/issues/195
2021-01-12 16:32:20 +01:00
Laurens Valk 1c201b5f8c examples/pup: generate light matrix examples 2020-11-11 18:56:38 +01:00
Laurens Valk abe1be18b2 examples/pup: add common light matrix display 2020-11-11 17:09:44 +01:00
Laurens Valk b0ffb24a2e examples: import snippets from pybricks-projects
These code samples are rendered in the docs, so we include them here.

For the git history of these snippets, see:
https://github.com/pybricks/pybricks-projects/commits/f4914069aaacfd9ab1e0dd6f05524f62cfc56b29/snippets
2020-11-04 10:17:33 +01:00
Laurens Valk 7ca33d8b97 projects: add submodule
This will contain the code snippets included by the docs.
2019-12-09 16:47:40 +01:00
Laurens Valk b8458cd086 add example submodule 2019-05-09 14:27:04 +02:00