Laurens Valk
a2ba8e4dcd
pybricks.hubs: Move .ble to BLERadio.
...
Follows upstream firmware change.
Update tests and examples too.
2026-05-29 11:12:50 +02:00
Laurens Valk
6739b517a5
examples: Fix duty cycle comment.
...
Fixes https://github.com/pybricks/support/issues/2029
2025-02-25 11:26:16 +01:00
Laurens Valk
2e538b66c3
pybricks.hubs: Change button to buttons.
...
Fixes https://github.com/pybricks/support/issues/1254
2024-03-05 14:52:54 +01:00
Laurens Valk
b4adb50adf
pybricks.robotics: Add Car class.
2024-01-25 20:38:02 +01:00
Laurens Valk
faf11581c0
pybricks.tools: Document hub_menu.
...
Fixes https://github.com/pybricks/pybricks-api/issues/144
2023-10-24 16:23:59 +02:00
Laurens Valk
8819446513
pybricks.common.BLE: Update broadcast API.
...
Match firmware updates.
2023-10-24 10:40:52 +02:00
Laurens Valk
578abab24e
signaltypes: Bare minimal async docs.
...
This is nowhere near complete, but provides handles to start documenting async for the relevant methods.
2023-10-23 16:28:50 +02:00
Laurens Valk
1a49d396d2
pybricks.robotics: Document use_gyro.
2023-10-23 15:39:52 +02:00
David Lechner and GitHub
3274cef849
pybricks.common: Add new BLE class.
...
This adds a new BLE class that is used for connectionless broadcasting/
observing on hubs with built-in Bluetooth Low Energy.
Also see https://github.com/pybricks/pybricks-micropython/pull/158 .
2023-05-16 14:46:53 -05:00
Laurens Valk
9cde749e8a
pybricks.geometry: Drop module.
...
See https://github.com/pybricks/pybricks-micropython/pull/160
2023-04-21 13:33:19 +02:00
Laurens Valk
8bca5eb6e4
pybricks.robotics: Add GyroDriveBase.
2023-04-21 10:42:30 +02:00
Laurens Valk
a553df3b03
pybricks.iodevices.PUPDevice: Add device class as comments.
2023-02-23 16:31:38 +01:00
Hans Willemen and laurensvalk
dbd1cc8dc9
pybricks.iodevices.PUPDevice: Add more devices.
...
Added:
- non-uart DCMotors (Medium and Train)
- non-uart Light
- SPIKE 3x3 Color Matrix
- SPIKE Small Angular Motor
2023-02-23 16:31:38 +01:00
Laurens Valk
e6d2ce7f62
examples: Update use of done().
2022-12-02 12:43:24 +01:00
Laurens Valk
64b0489a73
urandom: Move example to Move Hub.
...
Move it do a dedicated example instead of hardcoding it in the module docstring.
Also update changelog for missing previous changes while we are at it.
2022-12-01 09:55:40 +01:00
Laurens Valk
ef57dbf4a1
pybricks.common.LightMatrix: Rename image() to icon().
...
Fixes https://github.com/pybricks/support/issues/409
2022-11-22 14:26:15 +01:00
Barry-Williams and laurensvalk
492d6cd2d4
pybricks.robotics.DriveBase: Add basic example.
2022-10-28 08:23:14 +02:00
Laurens Valk
1b51d71061
examples: Generate hub examples while building.
...
This way we don't have to commit the generated scripts.
While we do this, rename ExampleHub to ThisHub so that the common scripts can actually run.
2022-07-04 14:29:33 +02:00
David Lechner and David Lechner
03ee7f74e8
doc/pup/essentialhub: fix bit rot
...
This fixes bitrot for PR #96 . Also fixes a few minor issues where
changes were missed.
2022-06-29 12:08:33 -05:00
Pavel Lobodinský and David Lechner
025147680c
pybricks.hubs.EssentialHub: Added missing Hub
2022-06-29 12:08:33 -05:00
Laurens Valk
bd7806d2d4
all: Format with black.
...
Also activate auto formatting. Bump flake8 and mark black
disagreements in setup.cfg.
2022-05-27 16:22:05 +02:00
Laurens Valk
f934fdd9bd
pybricks.common.IMU: Change example to print G force.
...
Since we changed the acceleration units to mm/s/s, the output values are
fairly large.
The Matrix repr function prints values up to 999, so this avoids
truncating the output.
It is also a good demo of scalar division for a Matrix / Vector.
2022-04-01 16:32:39 +02:00
Laurens Valk
e69c422f83
pybricks.common.Motor: Add absolute value example.
...
Fixes https://github.com/pybricks/support/issues/611
2022-01-20 08:39:43 +01:00
Laurens Valk
d3ae4ec9ee
pybricks.pupdevices.ColorSensor: Move cleanup example.
...
The color sensor light is much brighter, so having an example
to turn it off is a bit more useful.
Fixes https://github.com/pybricks/pybricks-api/pull/90
2022-01-07 14:11:03 +01:00
Laurens Valk
ffb2f8aa96
pybricks.pupdevices.UltrasonicSensor: Move cleanup example.
...
Also generalize the example so that it can be used on all hubs.
2022-01-07 13:38:07 +01:00
Pavel Lobodinský and laurensvalk
65c81834c9
pybricks.hubs.PrimeHub: Added a cleanup example.
2022-01-07 13:38:07 +01:00
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
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 and GitHub
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 and Laurens Valk
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 and Laurens Valk
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