diff --git a/doc/api/diagram_source/connecting.png b/doc/api/diagram_source/connecting.png new file mode 100644 index 0000000..0bcdafb Binary files /dev/null and b/doc/api/diagram_source/connecting.png differ diff --git a/doc/api/diagram_source/connecting.svg b/doc/api/diagram_source/connecting.svg new file mode 100644 index 0000000..951b3c5 --- /dev/null +++ b/doc/api/diagram_source/connecting.svg @@ -0,0 +1,368 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + Open file tab + + 1 + + + + + Open device browser + + 3 + + + + + Search for your EV3 Brick + + 4 + + + + + Select your EV3 Brick + + 5 + + + + Connect your EV3 with the USB cable + 4 + + 2 + diff --git a/doc/api/diagram_source/devicebrowser.svg b/doc/api/diagram_source/devicebrowser.svg new file mode 100644 index 0000000..8f8b958 --- /dev/null +++ b/doc/api/diagram_source/devicebrowser.svg @@ -0,0 +1,263 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + Open devices + + 1 + + + + Choose device type + + 2 + + + + Watch values + + 3 + + diff --git a/doc/api/diagram_source/devicebrowser0.png b/doc/api/diagram_source/devicebrowser0.png new file mode 100644 index 0000000..bab1000 Binary files /dev/null and b/doc/api/diagram_source/devicebrowser0.png differ diff --git a/doc/api/diagram_source/devicebrowser1.png b/doc/api/diagram_source/devicebrowser1.png new file mode 100644 index 0000000..3bb7ad7 Binary files /dev/null and b/doc/api/diagram_source/devicebrowser1.png differ diff --git a/doc/api/diagram_source/devicebrowser2.png b/doc/api/diagram_source/devicebrowser2.png new file mode 100644 index 0000000..47d661e Binary files /dev/null and b/doc/api/diagram_source/devicebrowser2.png differ diff --git a/doc/api/diagram_source/devicebrowser3.png b/doc/api/diagram_source/devicebrowser3.png new file mode 100644 index 0000000..c3dc61e Binary files /dev/null and b/doc/api/diagram_source/devicebrowser3.png differ diff --git a/doc/api/diagram_source/devicebrowser4.png b/doc/api/diagram_source/devicebrowser4.png new file mode 100644 index 0000000..859c140 Binary files /dev/null and b/doc/api/diagram_source/devicebrowser4.png differ diff --git a/doc/api/diagram_source/etcher.png b/doc/api/diagram_source/etcher.png new file mode 100644 index 0000000..8361132 Binary files /dev/null and b/doc/api/diagram_source/etcher.png differ diff --git a/doc/api/diagram_source/etcher.svg b/doc/api/diagram_source/etcher.svg new file mode 100644 index 0000000..25174c2 --- /dev/null +++ b/doc/api/diagram_source/etcher.svg @@ -0,0 +1,197 @@ + + + + + + + + image/svg+xml + + + + + + + + + + Select image + + Select drive + + Flash! + + + a + + + + c + + + 4 + + b + + diff --git a/doc/api/diagram_source/existingproject.png b/doc/api/diagram_source/existingproject.png new file mode 100644 index 0000000..0d5e325 Binary files /dev/null and b/doc/api/diagram_source/existingproject.png differ diff --git a/doc/api/diagram_source/existingproject.svg b/doc/api/diagram_source/existingproject.svg new file mode 100644 index 0000000..27b2e14 --- /dev/null +++ b/doc/api/diagram_source/existingproject.svg @@ -0,0 +1,248 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + Open a previouslycreated project + + 2 + + + + File + + 1 + + + + + + Open a recentlyused project + diff --git a/doc/api/diagram_source/files.png b/doc/api/diagram_source/files.png new file mode 100644 index 0000000..1e65903 Binary files /dev/null and b/doc/api/diagram_source/files.png differ diff --git a/doc/api/diagram_source/files.svg b/doc/api/diagram_source/files.svg new file mode 100644 index 0000000..c2cb5ef --- /dev/null +++ b/doc/api/diagram_source/files.svg @@ -0,0 +1,258 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + Project on your computer + + + + + Project on the EV3 Brick + + + + + + Right click + + + + Upload file back to your computer + + + + Delete file from the EV3 Brick + diff --git a/doc/api/diagram_source/firstprogram.svg b/doc/api/diagram_source/firstprogram.svg new file mode 100644 index 0000000..0e2a389 --- /dev/null +++ b/doc/api/diagram_source/firstprogram.svg @@ -0,0 +1,156 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + Large Motor + + + + + + Port B + + + diff --git a/doc/api/diagram_source/firstprogram1.jpg b/doc/api/diagram_source/firstprogram1.jpg new file mode 100644 index 0000000..e2b6b60 Binary files /dev/null and b/doc/api/diagram_source/firstprogram1.jpg differ diff --git a/doc/api/diagram_source/firstprogram2.png b/doc/api/diagram_source/firstprogram2.png new file mode 100644 index 0000000..1d21cfa Binary files /dev/null and b/doc/api/diagram_source/firstprogram2.png differ diff --git a/doc/api/diagram_source/manualrun.svg b/doc/api/diagram_source/manualrun.svg new file mode 100644 index 0000000..3de3764 --- /dev/null +++ b/doc/api/diagram_source/manualrun.svg @@ -0,0 +1,308 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + Open file browser + + 1 + + + + Open project folder + + 2 + + + + Run your program + + 3 + + + + Go to previous folder + + 4 + + diff --git a/doc/api/diagram_source/manualrun1.png b/doc/api/diagram_source/manualrun1.png new file mode 100644 index 0000000..6843377 Binary files /dev/null and b/doc/api/diagram_source/manualrun1.png differ diff --git a/doc/api/diagram_source/manualrun2.png b/doc/api/diagram_source/manualrun2.png new file mode 100644 index 0000000..5bba8c5 Binary files /dev/null and b/doc/api/diagram_source/manualrun2.png differ diff --git a/doc/api/diagram_source/manualrun3.png b/doc/api/diagram_source/manualrun3.png new file mode 100644 index 0000000..8d9ef0d Binary files /dev/null and b/doc/api/diagram_source/manualrun3.png differ diff --git a/doc/api/diagram_source/newproject.png b/doc/api/diagram_source/newproject.png new file mode 100644 index 0000000..8bcf8aa Binary files /dev/null and b/doc/api/diagram_source/newproject.png differ diff --git a/doc/api/diagram_source/newproject.svg b/doc/api/diagram_source/newproject.svg new file mode 100644 index 0000000..e965c4a --- /dev/null +++ b/doc/api/diagram_source/newproject.svg @@ -0,0 +1,276 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + Choose a location for yourproject in the pop-up window + + 4 + + + + + Open EV3 MicroPython tab + + 1 + + + + Create new project + + 2 + + + + + Choose a project name and press enter + + 3 + + diff --git a/doc/api/diagram_source/onoff.svg b/doc/api/diagram_source/onoff.svg new file mode 100644 index 0000000..942e136 --- /dev/null +++ b/doc/api/diagram_source/onoff.svg @@ -0,0 +1,247 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + Main menu + + 1 + + + + Power Off + + 3 + + + + Press back button + + 2 + + diff --git a/doc/api/diagram_source/onoff0.png b/doc/api/diagram_source/onoff0.png new file mode 100644 index 0000000..5eb4791 Binary files /dev/null and b/doc/api/diagram_source/onoff0.png differ diff --git a/doc/api/diagram_source/overview.jpg b/doc/api/diagram_source/overview.jpg new file mode 100644 index 0000000..07be516 Binary files /dev/null and b/doc/api/diagram_source/overview.jpg differ diff --git a/doc/api/diagram_source/overview.svg b/doc/api/diagram_source/overview.svg new file mode 100644 index 0000000..0059c3d --- /dev/null +++ b/doc/api/diagram_source/overview.svg @@ -0,0 +1,251 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + Computer with Visual Studio Code + + + + + Download and run + + + MicroSD card withEV3 MicroPython image + + + + + Mini-USB cable + + + + + + + EV3 Brick + diff --git a/doc/api/diagram_source/projectoverview.png b/doc/api/diagram_source/projectoverview.png new file mode 100644 index 0000000..bfde0b3 Binary files /dev/null and b/doc/api/diagram_source/projectoverview.png differ diff --git a/doc/api/diagram_source/projectoverview.svg b/doc/api/diagram_source/projectoverview.svg new file mode 100644 index 0000000..018d3e2 --- /dev/null +++ b/doc/api/diagram_source/projectoverview.svg @@ -0,0 +1,175 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + Write your program + + 2 + + + + Open main.py + + 1 + + diff --git a/doc/api/diagram_source/projectstructure.svg b/doc/api/diagram_source/projectstructure.svg new file mode 100644 index 0000000..b9aa69d --- /dev/null +++ b/doc/api/diagram_source/projectstructure.svg @@ -0,0 +1,375 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Project folder + + + getting_started + + + main.py + + + my_module.py + + + picture.png + + + sound.wav + + This main program runs when you press start (or F5) + + Any other files can be used by main.py + + + + diff --git a/doc/api/diagram_source/running.png b/doc/api/diagram_source/running.png new file mode 100644 index 0000000..2a6eb89 Binary files /dev/null and b/doc/api/diagram_source/running.png differ diff --git a/doc/api/diagram_source/running.svg b/doc/api/diagram_source/running.svg new file mode 100644 index 0000000..6f0d983 --- /dev/null +++ b/doc/api/diagram_source/running.svg @@ -0,0 +1,295 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + Output + + 3 + + + + + Run tab (or press F5) + + 1 + + + + Download and run + + + + + + + Stop + + 2 + + + + + Restart + diff --git a/doc/api/diagram_source/screen.png b/doc/api/diagram_source/screen.png new file mode 100644 index 0000000..fbde8be Binary files /dev/null and b/doc/api/diagram_source/screen.png differ diff --git a/doc/api/diagram_source/sd.svg b/doc/api/diagram_source/sd.svg new file mode 100644 index 0000000..5921096 --- /dev/null +++ b/doc/api/diagram_source/sd.svg @@ -0,0 +1,242 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + Place the cardin the SD slot,text side up + + + + + + + You can add a tape wrapperto easily removethe card later + + + First, turn offthe EV3 Brick + diff --git a/doc/api/diagram_source/sd1.jpg b/doc/api/diagram_source/sd1.jpg new file mode 100644 index 0000000..92de0c8 Binary files /dev/null and b/doc/api/diagram_source/sd1.jpg differ diff --git a/doc/api/diagram_source/sd2.png b/doc/api/diagram_source/sd2.png new file mode 100644 index 0000000..ad20789 Binary files /dev/null and b/doc/api/diagram_source/sd2.png differ diff --git a/doc/api/diagram_source/store.svg b/doc/api/diagram_source/store.svg new file mode 100644 index 0000000..60e2159 --- /dev/null +++ b/doc/api/diagram_source/store.svg @@ -0,0 +1,258 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + Open extensions tab + + 1 + + + + + Search for EV3 MicroPython + + 2 + + + + Install + 4 + + 3 + diff --git a/doc/api/diagram_source/store0.png b/doc/api/diagram_source/store0.png new file mode 100644 index 0000000..5a1d5c8 Binary files /dev/null and b/doc/api/diagram_source/store0.png differ diff --git a/doc/api/images/connecting_label.png b/doc/api/images/connecting_label.png new file mode 100644 index 0000000..dfb7602 Binary files /dev/null and b/doc/api/images/connecting_label.png differ diff --git a/doc/api/images/devicebrowser_label.png b/doc/api/images/devicebrowser_label.png new file mode 100644 index 0000000..0b5f590 Binary files /dev/null and b/doc/api/images/devicebrowser_label.png differ diff --git a/doc/api/images/etcher_label.png b/doc/api/images/etcher_label.png new file mode 100644 index 0000000..b101581 Binary files /dev/null and b/doc/api/images/etcher_label.png differ diff --git a/doc/api/images/existingproject_label.png b/doc/api/images/existingproject_label.png new file mode 100644 index 0000000..bf15530 Binary files /dev/null and b/doc/api/images/existingproject_label.png differ diff --git a/doc/api/images/files_label.png b/doc/api/images/files_label.png new file mode 100644 index 0000000..5ec8a32 Binary files /dev/null and b/doc/api/images/files_label.png differ diff --git a/doc/api/images/firstprogram_label.png b/doc/api/images/firstprogram_label.png new file mode 100644 index 0000000..a6110db Binary files /dev/null and b/doc/api/images/firstprogram_label.png differ diff --git a/doc/api/images/manualrun_label.png b/doc/api/images/manualrun_label.png new file mode 100644 index 0000000..2fe4796 Binary files /dev/null and b/doc/api/images/manualrun_label.png differ diff --git a/doc/api/images/newproject_label.png b/doc/api/images/newproject_label.png new file mode 100644 index 0000000..44c8dd4 Binary files /dev/null and b/doc/api/images/newproject_label.png differ diff --git a/doc/api/images/onoff_label.png b/doc/api/images/onoff_label.png new file mode 100644 index 0000000..48847f4 Binary files /dev/null and b/doc/api/images/onoff_label.png differ diff --git a/doc/api/images/overview_label.png b/doc/api/images/overview_label.png new file mode 100644 index 0000000..0c8bf77 Binary files /dev/null and b/doc/api/images/overview_label.png differ diff --git a/doc/api/images/projectoverview_label.png b/doc/api/images/projectoverview_label.png new file mode 100644 index 0000000..5c74703 Binary files /dev/null and b/doc/api/images/projectoverview_label.png differ diff --git a/doc/api/images/projectstructure_label.png b/doc/api/images/projectstructure_label.png new file mode 100644 index 0000000..73d09e3 Binary files /dev/null and b/doc/api/images/projectstructure_label.png differ diff --git a/doc/api/images/running_label.png b/doc/api/images/running_label.png new file mode 100644 index 0000000..828fa7b Binary files /dev/null and b/doc/api/images/running_label.png differ diff --git a/doc/api/images/sd_label.png b/doc/api/images/sd_label.png new file mode 100644 index 0000000..7505dbd Binary files /dev/null and b/doc/api/images/sd_label.png differ diff --git a/doc/api/images/store_label.png b/doc/api/images/store_label.png new file mode 100644 index 0000000..48121ea Binary files /dev/null and b/doc/api/images/store_label.png differ diff --git a/doc/api/index.rst b/doc/api/index.rst index 547cdb3..fe3fa6c 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -17,6 +17,13 @@ Intro Downloads Example Projects +.. toctree:: + :maxdepth: 1 + :caption: Getting started + :hidden: + + start_ev3 + .. toctree:: :maxdepth: 1 :caption: Pybricks Modules diff --git a/doc/api/start_ev3.rst b/doc/api/start_ev3.rst new file mode 100644 index 0000000..5111ef5 --- /dev/null +++ b/doc/api/start_ev3.rst @@ -0,0 +1,8 @@ +EV3 Quick Start +######################## + +.. include:: start_ev3_install.inc + +.. include:: start_ev3_brick.inc + +.. include:: start_ev3_run.inc diff --git a/doc/api/start_ev3_brick.inc b/doc/api/start_ev3_brick.inc new file mode 100644 index 0000000..755609b --- /dev/null +++ b/doc/api/start_ev3_brick.inc @@ -0,0 +1,72 @@ +Using the EV3 Brick +=================== + +Make sure the EV3 Brick is turned off. Insert the microSD card you prepared into the microSD card slot on the EV3 Brick, as shown in :numref:`fig_sd`. + +.. _fig_sd: + +.. figure:: images/sd_label.png + :width: 75 % + :alt: sd + :align: center + + Inserting the flashed microSD card into the EV3 Brick + + +Turning the EV3 Brick on and off +----------------------------------------------------------- + +Turn on the EV3 Brick by pressing the dark gray center button. + +The boot process may take several minutes. While booting, the EV3 Brick status light turns orange and blinks intermittently, and you'll see a lot of text on the EV3 screen. The EV3 Brick is ready for use when the status light turns green. + +To turn the EV3 Brick off, open the shutdown menu with the back button, and then select *Power Off* using the center button, as shown in :numref:`fig_onoff`. + +.. _fig_onoff: + +.. figure:: images/onoff_label.png + :width: 65 % + :alt: onoff + :align: center + + Turning the EV3 Brick off + +Viewing motor and sensor values +----------------------------------------------------------- + +When you're not running a program, you can view motor and sensor values using the device browser, as shown in :numref:`fig_devicebrowser`. + +.. _fig_devicebrowser: + +.. figure:: images/devicebrowser_label.png + :width: 100 % + :alt: devicebrowser + :align: center + + Viewing motor and sensor values + +Running a program without a computer +----------------------------------------------------------- + +You can run previously downloaded programs directly from the EV3 Brick. + +To do so, find the program using the *file browser* on the EV3 screen and press the center button key to start the program as shown in in :numref:`fig_manualrun`. + +.. _fig_manualrun: + +.. figure:: images/manualrun_label.png + :width: 100 % + :alt: manualrun + :align: center + + Starting a program using the buttons on the EV3 Brick + +Going back to the original firmware +----------------------------------------------------------- + +You can go back to the LEGO® firmware and your LEGO programs at any time. To do so: + +1. Turn the EV3 Brick off as shown above. +2. Wait for the screen and brick status light to turn off. +3. Remove the microSD card. +4. Turn the EV3 on. diff --git a/doc/api/start_ev3_install.inc b/doc/api/start_ev3_install.inc new file mode 100644 index 0000000..e4a8541 --- /dev/null +++ b/doc/api/start_ev3_install.inc @@ -0,0 +1,94 @@ +Installation +=================== + +This page guides you through the steps to collect and install everything you need to start programming. + +What do you need? +----------------------------------------------------------- + +To get started, you'll need: + +- A Windows 10 or Mac OS computer +- Internet access and administrator access + + This is required during the installation only. You will not need special access to write and run programs later on. + +- A microSD card + + You'll need a card with a minimum capacity of 4GB and a maximum capacity of 32GB. This type of microSD card is also known as microSDHC. We recommend cards with Application Performance Class A1. + +- A microSD card slot or card reader in your computer + + If your computer does not have a (micro)SD card slot, you can use an external USB (micro)SD card reader. + +- A mini-USB cable, like the one included with your EV3 set + +The typical configuration of this equipment is summarized in :numref:`fig_overview`. + +.. _fig_overview: + +.. figure:: images/overview_label.png + :width: 90 % + :alt: overview + :align: center + + Setup overview + +Preparing your computer +----------------------------------------------------------- + +You'll write your MicroPython programs using Visual Studio Code. Follow the steps below to download, install, and configure this application: + +1. Download `Visual Studio Code `_. +2. Follow the on-screen instructions to install the application. +3. Launch Visual Studio Code. +4. Open the extensions tab. +5. Install the EV3 MicroPython extension as shown in :numref:`fig_store`. + +.. _fig_store: + +.. figure:: images/store_label.png + :alt: store + :align: center + + Installing the extension from the Visual Studio Code marketplace + +.. _prepsdcard: + +Preparing the microSD card +----------------------------------------------------------- + +To make it possible to run MicroPython programs on your EV3 Brick, you'll now learn how to install the required tools on your microSD card. + +If the microSD card contains files you want to keep, make sure to create a backup of its contents first. See :ref:`managing files on the EV3 ` to learn how to backup your previous MicroPython programs if necessary. + +*This process erases everything on your microSD card, including any previous MicroPython programs on it.* + + +To install the MicroPython tools on your microSD card: + + +1. Download the `EV3 MicroPython microSD card image `_ and save it in a convenient location. This file is approximately 360 MB. You do **not** need to unzip the file. +2. Download and install a microSD card flashing tool such as `Etcher `_. +3. Insert the microSD card into your computer or card reader. +4. Launch the flashing tool and follow the steps on your screen to install the file you have just downloaded. If you use Etcher, you can follow the instructions below, as shown in :numref:`fig_etcher`. + + a. Select the EV3 MicroPython microSD card image file you have just downloaded. + b. Select your microSD card. Make sure that the device and size correspond to your microSD card. + c. Start the flashing process. This may take several minutes. Do not remove the card until the flashing process is complete. + +.. _fig_etcher: + +.. figure:: images/etcher_label.png + :width: 85 % + :alt: etcher + :align: center + + Using Etcher to flash the EV3 MicroPython microSD card image + +Updating the microSD card +----------------------------------------------------------- + +To update the microSD card, download a new image file using the link above and flash it to the microSD card as described above. Be sure to :ref:`back up any MicroPython programs you want to save `. + +You do not need to erase the contents of the microSD card first. This is done automatically when you flash the new image file. diff --git a/doc/api/start_ev3_run.inc b/doc/api/start_ev3_run.inc new file mode 100644 index 0000000..4d35859 --- /dev/null +++ b/doc/api/start_ev3_run.inc @@ -0,0 +1,135 @@ +Creating and running programs +============================= + +Now that you've set up your computer and EV3 Brick, you're ready to start writing programs. + +To make it easier to create and manage your programs, let's first have a quick look at how MicroPython projects and programs for your EV3 robots are organized. + +Programs are organized into *project folders*, as shown in :numref:`fig_projectstructure`. A project folder is a directory on your computer that contains the main program (**main.py**) and other optional scripts or files. This project folder and all of its contents will be copied to the EV3 Brick, where the main program will be run. + +This page shows you how to create such a project and how to transfer it to the EV3 Brick. + +.. _fig_projectstructure: + +.. figure:: images/projectstructure_label.png + :width: 100 % + :alt: projectstructure + :align: center + + A project contains a program called **main.py** and optional resources like sounds or MicroPython modules. + + +Creating a new project +----------------------------------------------------------- + +To create a new project, open the EV3 MicroPython tab and click *create a new project*, as shown in :numref:`fig_newproject`. Enter a project name in the text field that appears and press *Enter*. When prompted, choose a location for this program and confirm by clicking *choose folder*. + +.. _fig_newproject: + +.. figure:: images/newproject_label.png + :width: 100 % + :alt: newproject + :align: center + + Creating a new project. This example is called *getting_started*, but you can choose any name. + +When you create a new project, it already includes a file called *main.py*. To see its contents and to modify it, open it from the file browser as shown in :numref:`fig_projectoverview`. This is where you'll write your programs. + +If you are new to MicroPython programming, we recommend that you keep the existing code in place and add your code to it. + +.. _fig_projectoverview: + +.. figure:: images/projectoverview_label.png + :width: 100 % + :alt: projectoverview + :align: center + + Opening the default *main.py* program. + +Opening an existing project +----------------------------------------------------------- + +To open a project you created previously, click *File* and click *Open Folder*, as shown in :numref:`fig_existingproject`. Next, navigate to your previously created project folder and click *OK*. You can also open your recently used projects using the *Open Recent* menu option. + +.. _fig_existingproject: + +.. figure:: images/existingproject_label.png + :width: 75 % + :alt: existingproject + :align: center + + Opening a previously created project. + + +Connecting to the EV3 Brick with Visual Studio Code +----------------------------------------------------------- + +To be able to transfer your code to the EV3 Brick, you'll first need to connect the EV3 Brick to your computer with the mini-USB cable and configure the connection with Visual Studio Code. To do so: + +- Turn the EV3 Brick on +- Connect the EV3 Brick to your computer with the mini-USB cable +- Configure the USB connection as shown in :numref:`fig_connecting`. + +.. _fig_connecting: + +.. figure:: images/connecting_label.png + :width: 100 % + :alt: connecting + :align: center + + Configuring the USB connection between the computer and the EV3 Brick + +Downloading and running a program +----------------------------------------------------------- + +You can press the F5 key to run the program. Alternatively, you can start it manually by going to the *debug* tab and clicking the green start arrow, as shown in :numref:`fig_running`. + +When the program starts, a pop-up toolbar allows you to stop the program if necessary. You can also stop the program at any time using the back button on the EV3 Brick. + +If your program produces any output with the ``print`` command, this is shown in the output window. + +.. _fig_running: + +.. figure:: images/running_label.png + :width: 100 % + :alt: running + :align: center + + Running a program + +Expanding the example program +----------------------------------------------------------- + +Now that you've run the basic code template, you can expand the program to make a motor move. First, attach a Large Motor to Port B on the EV3 Brick, as shown in :numref:`fig_firstprogram`. + +.. _fig_firstprogram: + +.. figure:: images/firstprogram_label.png + :width: 100 % + :alt: firstprogram + :align: center + + The EV3 Brick with a Large Motor attached to port B. + +Next, edit *main.py* to make it look like this: + +.. literalinclude:: + ../../pybricks-projects/snippets/ev3/getting_started/main.py + +This program makes your robot beep, rotate the motor, and beep again with a higher pitched tone. Run the program to make sure that it works as expected. + +.. _managefiles: + +Managing files on the EV3 Brick +----------------------------------------------------------- + +After you've downloaded a project to the EV3 Brick, you can run, delete, or back up programs stored on it using the device browser as shown in in :numref:`fig_files`. + +.. _fig_files: + +.. figure:: images/files_label.png + :width: 100 % + :alt: files + :align: center + + Using the EV3 device browser to manage files on your EV3 Brick