mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
doc/start_pup: instructions for permanent program
This commit is contained in:
committed by
laurensvalk
parent
13be26443b
commit
07b4b5b783
@@ -12,6 +12,52 @@ Installing the Pybricks Firmware
|
||||
<video controls src="http://pybricks.com/wp-content/uploads/2020/06/install.mp4" width="100%"></video>
|
||||
|
||||
|
||||
Running Programs
|
||||
--------------------------------
|
||||
|
||||
|
||||
|
||||
Advanced: Saving a Program on the Hub
|
||||
--------------------------------------
|
||||
|
||||
When you run a program as shown above, it is deleted as soon as it's done.
|
||||
That's because Powered Up hubs don't have a file system to store
|
||||
programs. Fortunately, you can still save a script on the hub by including it
|
||||
in the firmware.
|
||||
|
||||
Of course, this is a bit slow to do every time. We recommend the
|
||||
using the standard procedure most of the time.
|
||||
When you're happy with your final program, you can save it permanently as
|
||||
described below. To change the program, just repeat these steps.
|
||||
|
||||
*Once installed, you can start that program with the green button.
|
||||
No connection required!*
|
||||
|
||||
.. todo::
|
||||
|
||||
**Coming soon! This will be made easy with the click of a button.**
|
||||
|
||||
.. toggle-header::
|
||||
:header: **But I want it now! Show me the hard way!**
|
||||
|
||||
**Installing a permanent program manually**
|
||||
|
||||
The firmware is a ZIP archive containing the basic firmware and one
|
||||
``main.py`` script:
|
||||
|
||||
1. Go to the `latest builds`_.
|
||||
2. Click a build with a green checkmark.
|
||||
3. Download ZIP archive for your hub.
|
||||
4. Modify the ``main.py`` file as you like.
|
||||
5. Drag your modified ZIP file *onto* the firmware update button.
|
||||
6. The update now proceeds as usual.
|
||||
7. When it's done, start your program with the green button!
|
||||
|
||||
Note: all LEGO motors and sensors need a few seconds to boot. You don't
|
||||
normally notice because you spend that time connecting. But with the
|
||||
program already installed, you're way faster. So if you experience
|
||||
problems, give your hub a few seconds before you start your program.
|
||||
|
||||
Restoring the LEGO Firmware
|
||||
---------------------------
|
||||
|
||||
@@ -20,3 +66,4 @@ Restoring the LEGO Firmware
|
||||
<video controls src="http://pybricks.com/wp-content/uploads/2020/06/restore.mp4" width="100%"></video>
|
||||
|
||||
|
||||
.. _latest builds: https://github.com/pybricks/pybricks-micropython/actions?query=workflow%3ABuild+
|
||||
|
||||
Reference in New Issue
Block a user