Commit Graph
62 Commits
Author SHA1 Message Date
Laurens Valk ab8b560ef4 official_models/ev3/snap: fix imports, head reset 2020-04-01 13:31:26 +02:00
Laurens Valk 9d96435675 official_models/ev3/elephant: fix brake, imports
The original example used brake, so let's keep using it.

Also fix media imports
2020-04-01 13:31:26 +02:00
Laurens Valk 0ef1a9f956 snippets/ev3: update workspaces
run ./update_workspaces.py
2020-04-01 13:31:26 +02:00
Laurens Valk 3744ad1918 official_models/ev3: update workspaces
run ./update_workspaces.py
2020-04-01 13:31:26 +02:00
Laurens Valk cabe91a044 official_models/ev3/tank_bot: fix driving
This example computed time from length, to then drive for that time. Since there is now simply a function to drive straight for a given distance, use that instead.

Also add wait after drive(0, 0) to give it some time to reach that speed (a standstill).

Also fix ImageFile import
2020-04-01 13:31:26 +02:00
David Lechner 63cf2ec4b5 official_models/ev3: expansion programs v2.0
Start updating these examples to 2.0 API
2020-04-01 13:31:26 +02:00
David Lechner 32b57a8cdd official_models/ev3: expansion programs v1.0 2020-04-01 13:31:26 +02:00
David Lechner 28e3bc8f0c Fix typo too/to 2020-03-26 16:22:19 -05:00
Laurens Valk 8cf77b8576 official/ev3/puppy: flake8
Stop is no longer used since d4d48efdbb
2020-03-26 13:54:16 +01:00
David Lechner d59bf03daf snippets/ev3: Split screen into separate projects
These will be included as examples in the API docs
2020-03-26 13:44:22 +01:00
Laurens Valk 51c91aebd7 official_models/ev3: update control API
Although set_run_settings remains implemented, we update the examples to use the updated API
2020-03-26 13:43:10 +01:00
David Lechner d4d48efdbb official_models/ev3: Update for motor API changes
Breaking changes were made in the motor API.

The stop(Stop.*) methods was split into explicit methods and the stop
argument in run_* methods was renamed and the default value changed in
some cases.
2020-03-26 13:43:10 +01:00
Laurens Valk 6a57abbff6 snippets/ev3/bluetooth: update mailbox name
In examples, it is helpful to give unrelated things different names.
2020-03-25 12:59:16 +01:00
Laurens Valk af926c5f19 snippets/ev3/buttons_quickstart: initial project
This is a demo of:
- multi-file project
- using images
- creating a "menu"

This program can be started away from the competition table.
Then a mission can be quickly activated by pressing one of the buttons.
2020-03-20 13:58:09 +01:00
David Lechner 90f2522068 CONTRIBUTING: new contributing guidelines
This file just links to pybricks-api since this repository
is not a stand-alone project.
2020-03-13 10:09:23 -05:00
David Lechner 789353ff3e AUTHORS: new authors file
This file explains code ownership.
2020-03-13 10:05:26 -05:00
Laurens Valk 5756a9caa0 ev3/puppy: flake8 2020-03-05 16:52:53 +01:00
Laurens Valk 221a7df0a5 official_models/ev3: add missing launch files
And update workspace
2020-03-05 16:46:26 +01:00
David Lechner 3b222fb2b4 ev3/puppy: fixes
- fix eyes blinking too long
- fix using 100% cpu when adjusting head
2020-03-05 16:44:49 +01:00
David Lechner 19f70a0bdb ev3/puppy: Mostly completed program 2020-03-05 16:44:41 +01:00
David Lechner 36522ad7ce ev3/puppy: new program (incomplete) 2020-03-05 16:44:24 +01:00
David Lechner fa0ef54fee ev3/color_sorter: set duty limit
This way, we don't torque so hard on parts that can't move
2020-03-05 16:44:20 +01:00
David Lechner 7772e76de4 ev3/color_sorter: add example 2020-03-05 16:43:50 +01:00
David Lechner 7fea4e5912 ev3/gyro_boy: remove unused type 2020-03-05 16:43:44 +01:00
David Lechner 53cf86265f ev3/gyro_boy: don't hog CPU
This uses wait() instead of busy waiting so we don't hog the CPU.
The busy wait was previously used because of motor control timing bugs.
2020-03-05 16:43:38 +01:00
David Lechner d399974119 ev3/gyro_boy: improvements
- more explanations
- explicit actions
- more consistent with EV3-G/scratch programs
2020-03-05 16:43:25 +01:00
David Lechner e07d3d05e8 ev3/gyro_boy: Add sensor input task
Functionality is still not quite the same as EV3-G/Scratch.
action_update() should remember the old speed during ultrasonic
reaction and then restore it.

Also, tuning is a bit off since loop time is ~26ms compared to ~18
in EV3-G/Scratch.
2020-03-05 16:42:51 +01:00
David Lechner 355c526412 ev3/gyro_boy: example (incomplete) 2020-03-05 16:41:48 +01:00
Laurens Valk 3bb19daadf snippets/ev3: add getting started snippet
Include it from here instead of having the code directly in the docs.
2020-03-05 15:14:02 +01:00
Laurens Valk bde1e6bac5 LICENSE: Update year and authors 2020-03-05 10:26:24 +01:00
Laurens Valk 106c8cf600 snippets/ev3: remove print from imports
We use the default print in the latest release, so importing is not required.
2020-03-04 10:24:53 +01:00
Laurens Valk af9cb706b2 update_workspaces: auto update all ev3 folders
And in doing so, add empty folders for the new projects to be added to.
2020-03-03 12:06:16 +01:00
Laurens Valk a3025707a7 official_models/ev3: add robot arm 2020-03-03 12:01:55 +01:00
Laurens Valk 64c29d49ce update_workspaces: generalize generator
Make it useful for upcoming EV3 folders as well.
2020-03-03 11:48:26 +01:00
Laurens Valk 4fca9387f3 snippets/ev3: auto generate workspace 2020-03-03 11:32:34 +01:00
Laurens Valk 291f4ad4dd tests/ev3: remove all
Tests are currently developed in a separate repository.
2020-02-27 10:20:55 +01:00
Laurens Valk 297aa88459 snippets/ev3/ev3devsensor: initial examples 2020-02-25 10:15:59 +01:00
Laurens Valk 561315a105 snippets/ev3/datalog: update arguments 2020-02-14 11:46:33 +01:00
Laurens Valk 05ce47e739 snippets/ev3/datalog: add main and extra example 2020-02-14 11:37:13 +01:00
David Lechner 7bc9ef5acf snippets/ev3/bluetooth_client/client: use name instead of address
We no longer have to use the Bluetooth address.
2020-02-12 15:50:21 -06:00
Laurens Valk a18ba6499c snippets/ev3/vernier: temperature example 2020-02-12 12:47:55 +01:00
David Lechner 5ffedc9d51 ev3dev/bluetooth: update examples for api changes 2020-02-11 12:50:52 -06:00
David Lechner fcc8af3381 snippets/ev3/screen: update for API changes 2020-02-11 11:21:04 -06:00
David Lechner 55912786eb Add bluetooth example projects 2020-02-03 16:32:30 -06:00
Laurens Valk 8d9bb6e11a snippets/ev3/i2c_extra: update i2c
Reflect that we read one byte by default.

Also allow a second way to send one byte, by specifying a register with no data.
2020-02-03 10:34:42 +01:00
David Lechner f7f1ce5768 resources renamed to media.ev3dev 2020-01-14 10:35:09 -06:00
David Lechner b7a111a78f snippets/ev3/screen_extra: fix flake8 error 2020-01-13 20:09:00 -06:00
David Lechner fe3a7ae636 snippets/ev3/speaker_basics: add Danish example 2020-01-13 20:03:51 -06:00
David Lechner 37ca78217f snippets/ev3/screen_basics: finish show_image todo
ev3.screen.show_image is implemented now
2020-01-13 18:50:22 -06:00
David Lechner 05b69c1684 snippits/ev3/speaker_basics: new project for basic speaker ops 2020-01-12 14:18:11 -06:00