mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 09:37:25 +00:00
doc: file manager
doc: basic drive base example
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
@@ -0,0 +1,284 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
width="977"
|
||||
height="643"
|
||||
viewBox="0 0 977 643"
|
||||
sodipodi:docname="files.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<metadata
|
||||
id="metadata8">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs6">
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath832">
|
||||
<rect
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:4;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect834"
|
||||
width="79.903069"
|
||||
height="21.495689"
|
||||
x="135.05739"
|
||||
y="496.71216" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath883">
|
||||
<rect
|
||||
style="fill:#252526;fill-opacity:1;stroke:none;stroke-width:4;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect885"
|
||||
width="67.5"
|
||||
height="19.75"
|
||||
x="136.25"
|
||||
y="467" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1043"
|
||||
id="namedview4"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.35355339"
|
||||
inkscape:cx="951.65327"
|
||||
inkscape:cy="561.71362"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2" />
|
||||
<image
|
||||
sodipodi:absref="/home/laurens/pybricks/git/micropython/ports/pybricks/doc/source/_images/files.png"
|
||||
xlink:href="files.png"
|
||||
width="977"
|
||||
height="643"
|
||||
preserveAspectRatio="none"
|
||||
id="image876"
|
||||
x="0"
|
||||
y="0" />
|
||||
<image
|
||||
sodipodi:absref="/home/laurens/pybricks/git/micropython/ports/pybricks/doc/source/_images/files1.png"
|
||||
xlink:href="files1.png"
|
||||
width="173"
|
||||
height="156"
|
||||
preserveAspectRatio="none"
|
||||
id="image865"
|
||||
x="202.7807"
|
||||
y="468.75732" />
|
||||
<rect
|
||||
style="fill:#1e1e1e;fill-opacity:1;stroke:none;stroke-width:4;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect836"
|
||||
width="49.059399"
|
||||
height="20.264719"
|
||||
x="502.80865"
|
||||
y="210.17946" />
|
||||
<image
|
||||
sodipodi:absref="/home/laurens/pybricks/git/micropython/ports/pybricks/doc/source/_images/files.png"
|
||||
xlink:href="files.png"
|
||||
transform="translate(-40.656854,-304.01429)"
|
||||
clip-path="url(#clipPath883)"
|
||||
y="0"
|
||||
x="0"
|
||||
id="image879"
|
||||
preserveAspectRatio="none"
|
||||
height="643"
|
||||
width="977" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4646"
|
||||
d="m 234.12358,160.47525 h 67.17514"
|
||||
style="fill:none;stroke:#6ab0de;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
y="138.24907"
|
||||
x="264.2655"
|
||||
height="42.092525"
|
||||
width="314.42899"
|
||||
id="rect4648"
|
||||
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<rect
|
||||
y="138.24907"
|
||||
x="264.2655"
|
||||
height="4"
|
||||
width="314.42899"
|
||||
id="rect4650"
|
||||
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:24.19441986px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.60486054"
|
||||
x="274.23575"
|
||||
y="168.83434"
|
||||
id="text4654"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4652"
|
||||
x="274.23575"
|
||||
y="168.83434"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.60486054">Project on your computer</tspan></text>
|
||||
<circle
|
||||
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:#6ab0de;stroke-width:4;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="circle991"
|
||||
cx="261.46036"
|
||||
cy="-445.23657"
|
||||
r="13.407484"
|
||||
transform="scale(1,-1)" />
|
||||
<path
|
||||
style="fill:none;stroke:#6ab0de;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 261.2223,432.09352 V 364.91838"
|
||||
id="path993"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect995"
|
||||
width="314.42899"
|
||||
height="42.092525"
|
||||
x="235.85634"
|
||||
y="362.13763" />
|
||||
<rect
|
||||
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect997"
|
||||
width="314.42899"
|
||||
height="4"
|
||||
x="235.85634"
|
||||
y="362.13763" />
|
||||
<text
|
||||
id="text1001"
|
||||
y="392.7229"
|
||||
x="245.8266"
|
||||
style="font-style:normal;font-weight:normal;font-size:24.19441986px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.60486054"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.60486054"
|
||||
y="392.7229"
|
||||
x="245.8266"
|
||||
id="tspan999"
|
||||
sodipodi:role="line">Project on the EV3 brick</tspan></text>
|
||||
<circle
|
||||
transform="scale(1,-1)"
|
||||
r="13.407484"
|
||||
cy="-160.07153"
|
||||
cx="224.39969"
|
||||
id="circle1013"
|
||||
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:#6ab0de;stroke-width:4;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<circle
|
||||
transform="scale(1,-1)"
|
||||
r="9.1574841"
|
||||
cy="-473.97672"
|
||||
cx="124.66604"
|
||||
id="circle1015"
|
||||
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:#6ab0de;stroke-width:4;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1017"
|
||||
d="M 124.33648,519.39965 V 482.22451"
|
||||
style="fill:none;stroke:#6ab0de;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
y="500.44379"
|
||||
x="28.470512"
|
||||
height="42.092525"
|
||||
width="141.92899"
|
||||
id="rect1019"
|
||||
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<rect
|
||||
y="500.44379"
|
||||
x="28.470512"
|
||||
height="4"
|
||||
width="141.92899"
|
||||
id="rect1021"
|
||||
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:24.19441986px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.60486054"
|
||||
x="38.440773"
|
||||
y="531.02905"
|
||||
id="text1025"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1023"
|
||||
x="38.440773"
|
||||
y="531.02905"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.60486054">Right click</tspan></text>
|
||||
<path
|
||||
style="fill:none;stroke:#6ab0de;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 316.70202,565.03873 h 37.17514"
|
||||
id="path1029"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect1031"
|
||||
width="409.21533"
|
||||
height="42.092525"
|
||||
x="352.96503"
|
||||
y="557.19867" />
|
||||
<rect
|
||||
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
||||
id="rect1033"
|
||||
width="409.21533"
|
||||
height="4"
|
||||
x="352.96503"
|
||||
y="557.19867" />
|
||||
<text
|
||||
id="text1037"
|
||||
y="587.78394"
|
||||
x="362.9353"
|
||||
style="font-style:normal;font-weight:normal;font-size:24.19441986px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.60486054"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.60486054"
|
||||
y="587.78394"
|
||||
x="362.9353"
|
||||
id="tspan1035"
|
||||
sodipodi:role="line">Upload file back to your computer</tspan></text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1047"
|
||||
d="m 316.70202,532.51182 h 37.17514"
|
||||
style="fill:none;stroke:#6ab0de;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
y="503.45856"
|
||||
x="352.96503"
|
||||
height="42.092525"
|
||||
width="409.21533"
|
||||
id="rect1039"
|
||||
style="opacity:1;fill:#e7f2fa;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<rect
|
||||
y="503.45856"
|
||||
x="352.96503"
|
||||
height="4"
|
||||
width="409.21533"
|
||||
id="rect1041"
|
||||
style="opacity:1;fill:#6ab0de;fill-opacity:1;stroke:none;stroke-width:2.13333321;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:24.19441986px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#404140;fill-opacity:1;stroke:none;stroke-width:0.60486054"
|
||||
x="362.9353"
|
||||
y="534.04382"
|
||||
id="text1045"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1043"
|
||||
x="362.9353"
|
||||
y="534.04382"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Slab';-inkscape-font-specification:'Roboto Slab';fill:#404140;fill-opacity:1;stroke-width:0.60486054">Delete file from the EV3 brick</tspan></text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
+13
-3
@@ -72,7 +72,7 @@ When the program starts, a pop up toolbar allows you to stop the program if nece
|
||||
Expanding the example program
|
||||
-----------------------------------------------------------
|
||||
|
||||
...
|
||||
Now that you've run the basic code template, let's expand the program to make a motor move. First, attach a Large Motor to Port B on the EV3 brick, as shown below.
|
||||
|
||||
|
||||
.. figure:: images/firstprogram.png
|
||||
@@ -82,16 +82,26 @@ Expanding the example program
|
||||
|
||||
The EV3 brick with a Large Motor attached to port B.
|
||||
|
||||
Next, edit *main.py* such that looks like this:
|
||||
|
||||
.. literalinclude:: ../../examples/ev3/getting_started/main.py
|
||||
|
||||
...
|
||||
When you run the program, you'll hear a beep, the motor rotates, and you'll hear another higher pitched beep.
|
||||
|
||||
.. _managefiles:
|
||||
|
||||
Managing files on the EV3
|
||||
-----------------------------------------------------------
|
||||
|
||||
...
|
||||
After you've downloaded a project to the EV3, you can run, delete, or back up programs stored on the EV3, as shown in the diagram below.
|
||||
|
||||
.. figure:: images/files.png
|
||||
:width: 100 %
|
||||
:alt: alt
|
||||
:align: center
|
||||
|
||||
The EV3 brick with a Large Motor attached to port B.
|
||||
|
||||
|
||||
Running a program without a computer
|
||||
-----------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user