Update documentation
BIN
_images/01_boot.png
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
_images/02_psk.png
Normal file
After Width: | Height: | Size: 239 KiB |
BIN
_images/03_codeServerFile.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
_images/04_codeServerRun.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
_images/05_codeServerTerminal.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
_images/06_codeServerFolder.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
_images/07_irSensor.webp
Normal file
After Width: | Height: | Size: 41 KiB |
12
_sources/faq.rst.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
FAQ
|
||||
###
|
||||
|
||||
Was ist das Passwort für die Entwicklungsumgebung?
|
||||
--------------------------------------------------
|
||||
``compair``
|
||||
|
||||
Wie verbinde ich mich zur Entwicklungsumgebung?
|
||||
-----------------------------------------------
|
||||
|
||||
See :ref:`gettingstarted_codeserver`
|
||||
|
11
_sources/gettingStarted/codeServer.rst.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
.. _gettingstarted_codeserver:
|
||||
|
||||
Programmierumgebung
|
||||
###################
|
||||
|
||||
Als Umgebung zur Programmierung des Roboters wird `code-server <https://github.com/coder/code-server>`_ eingesetzt, welche bereits am Roboter vorinstalliert ist.
|
||||
|
||||
Verbindung zur Entwicklungsumgebung herstellen
|
||||
----------------------------------------------
|
||||
Am Roboter wird die IP-Adresse des Raspberry Pi angezeigt. Um nun die Verbindung herzustellen, muss man in einem Web-Browser einfach ``<roboter_ip>:8080`` eingeben.
|
||||
Das Passwort für Visual Studio Code im Browser ist ``compair``!
|
26
_sources/gettingStarted/firstProgram.rst.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
Mein erstes Programm
|
||||
####################
|
||||
|
||||
Um mit der Programmierung zu beginnen, müssen wir zunächst einen neuen Ordner erstellen, in dem alle unsere Python-Dateien gespeichert werden.
|
||||
|codeServerFolder|
|
||||
|
||||
Sie können diesen Ordner nennen, wie Sie wollen, für dieses Beispiel heißt er ``compAIR``.
|
||||
Im nächsten Schritt erstellen wir unsere Datei ``main.py``.
|
||||
|codeServerFile|
|
||||
|
||||
Dann können wir beginnen, unseren Code in diese Datei zu schreiben.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
print("Hallo Welt")
|
||||
|
||||
Praktischerweise können wir die Datei auch über die VS-Code-Plattform ausführen.
|
||||
|codeServerRun|
|
||||
|
||||
Dann öffnet sich ein Terminal, der die Ausgabe unseres Programms anzeigt.
|
||||
|codeServerTerminal|
|
||||
|
||||
.. |codeServerFolder| image:: images/06_codeServerFolder.png
|
||||
.. |codeServerFile| image:: images/03_codeServerFile.png
|
||||
.. |codeServerRun| image:: images/04_codeServerRun.png
|
||||
.. |codeServerTerminal| image:: images/05_codeServerTerminal.png
|
11
_sources/gettingStarted/index.rst.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
Erste Schritte
|
||||
##############
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 5
|
||||
|
||||
wifi.rst
|
||||
codeServer.rst
|
||||
firstProgram.rst
|
||||
secondProgram.rst
|
||||
thridProgram.rst
|
313
_sources/gettingStarted/secondProgram.rst.txt
Normal file
|
@ -0,0 +1,313 @@
|
|||
Mein zweites Programm
|
||||
#####################
|
||||
|
||||
Motoren ansteuern
|
||||
-----------------
|
||||
|
||||
Um die Motoren des Roboters zu steuern, müssen wir zunächst das entsprechende Python-Modul am Anfang der Datei importieren. Dann können wir Motor.power(port, power) verwenden, um den Motor zu steuern.
|
||||
Dies ist auch ein guter Punkt, um sich mit der Dokumentation vertraut zu machen: Besuchen wir https://lib.comp-air.at/lib/Motor.html#compLib.Motor.Motor.power. Hier werden die beiden relevanten Parameter beschrieben.
|
||||
|
||||
Als Beispiel wollen wir den rechten Motor für fünf Sekunden auf volle Geschwindigkeit setzen:
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
# motor.py
|
||||
import time
|
||||
from compLib.Motor import Motor
|
||||
|
||||
Motor.power(0, 100)
|
||||
time.sleep(5)
|
||||
|
||||
Gerade fahren
|
||||
-------------
|
||||
Um geradeaus zu fahren, müssen wir beide Motoren auf dieselbe Geschwindigkeit einstellen.
|
||||
Aber Achtung! Der rechte Motor muss umgedreht werden! Das liegt daran, dass einer nach rechts und einer nach links zeigt, sie sind also technisch gesehen gespiegelt.
|
||||
Wenn wir nun diesen Code ausführen, wird der Roboter 5 Sekunden lang vorwärts fahren:
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
# motor.py
|
||||
import time
|
||||
from compLib.Motor import Motor
|
||||
|
||||
Motor.power(0, -100)
|
||||
Motor.power(3, 100)
|
||||
time.sleep(5)
|
||||
|
||||
**Erläuterung**
|
||||
|
||||
| In ``Zeile 2`` wird das python-Paket ``time`` importiert. Wir brauchen es später, um auf die Fahrt des Roboters zu warten. Z.B.: ``time.sleep(5)``
|
||||
| In ``Zeile 3`` importieren wir die notwendigen Funktionen aus dem ``Motor``-Modul der compLib.
|
||||
| In ``Zeile 5`` stellen wir den ``rechten`` Motor so ein, dass er vorwärts fährt. Da der Motor rückwärts eingebaut ist, müssen wir den Wert auf ``-100`` setzen.
|
||||
| In ``Zeile 6`` stellen wir den ``linken`` Motor auf Vorwärtsfahrt ein. Hier können wir den Wert ``100`` verwenden, da der Motor in der richtigen Richtung eingebaut ist.
|
||||
| In ``Zeile 7`` müssen wir warten, bis der Roboter die Fahrbefehle tatsächlich ausführt. In diesem Fall warten wir ``5`` Sekunden lang.
|
||||
|
||||
Danach wird das Programm beendet und der Roboter bleibt stehen.
|
||||
|
||||
Mehr fahren
|
||||
+++++++++++
|
||||
|
||||
Jetzt ist es Zeit für einige komplexere Bewegungen. Um unseren Code modular und leicht lesbar zu halten, werden wir jede Aktion in eine eigene Funktion packen.
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
import time
|
||||
from compLib.Motor import Motor
|
||||
|
||||
def driveForward():
|
||||
Motor.power(0, -100)
|
||||
Motor.power(3, 100)
|
||||
time.sleep(2)
|
||||
|
||||
In ``Zeile 4`` definieren wir die Funktion ``driveForward()``, die den Roboter mit voller Geschwindigkeit zwei Sekunden vorwärts bewegt.
|
||||
|
||||
Jetzt werden wir eine Funktion für das Rückwärtsfahren definieren:
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
import time
|
||||
from compLib.Motor import Motor
|
||||
|
||||
def driveForward():
|
||||
Motor.power(0, -100)
|
||||
Motor.power(3, 100)
|
||||
time.sleep(2)
|
||||
|
||||
def driveBackward():
|
||||
Motor.power(0, 100)
|
||||
Motor.power(3, -100)
|
||||
time.sleep(2)
|
||||
|
||||
In ``Zeile 9`` haben wir die Funktion ``driveBackward()`` definiert, die den Roboter zwei Sekunden lang rückwärts fahren lässt.
|
||||
|
||||
Jetzt können wir diese beiden Funktionen aufrufen und vorwärts und dann wieder rückwärts fahren:
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
import time
|
||||
from compLib.Motor import Motor
|
||||
|
||||
def driveForward():
|
||||
Motor.power(0, -100)
|
||||
Motor.power(3, 100)
|
||||
time.sleep(2)
|
||||
|
||||
def driveBackward():
|
||||
Motor.power(0, 100)
|
||||
Motor.power(3, -100)
|
||||
time.sleep(2)
|
||||
|
||||
driveForward()
|
||||
driveBackward()
|
||||
|
||||
Wenn wir diesen Code ausführen, sollte der Roboter zunächst zwei Sekunden vorwärts und dann wieder zwei Sekunden rückwärts fahren und ungefähr an der gleichen Position wie beim Start anhalten.
|
||||
|
||||
Zwischen den Zeilen ``14`` und ``15`` brauchen wir kein ``time.sleep(2)``, da der sleep-Befehl bereits in den Funktionen integriert ist.
|
||||
|
||||
Jetzt wollen wir, dass der Roboter erst vorwärts fährt, dann zwei Sekunden stillsteht und dann wieder rückwärts in seine Ausgangsposition fährt.
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
import time
|
||||
from compLib.Motor import Motor
|
||||
|
||||
def driveForward():
|
||||
Motor.power(0, -100)
|
||||
Motor.power(3, 100)
|
||||
time.sleep(2)
|
||||
|
||||
def driveBackward():
|
||||
Motor.power(0, 100)
|
||||
Motor.power(3, -100)
|
||||
time.sleep(2)
|
||||
|
||||
driveForward()
|
||||
time.sleep(2)
|
||||
driveBackward()
|
||||
|
||||
Wenn wir den obigen Code ausführen, bleibt der Roboter nicht zwei Sekunden lang stehen, sondern fährt nach der Funktion ``driveForward()`` noch zwei Sekunden lang weiter. Warum passiert das? Um das zu verstehen, müssen wir wie der Roboter denken!
|
||||
|
||||
**Erläuterung**
|
||||
|
||||
| 1. (``Zeile 14``) Die Funktion Vorwärtsfahrt wird aufgerufen
|
||||
| (``Zeile 5``) Motor 1 wird auf -100 gesetzt
|
||||
| (``Zeile 6``) Motor 4 wird auf 100 gesetzt
|
||||
| (``Zeile 7``) Zwei Sekunden warten und Motor 1 mit der Geschwindigkeit -100 und Motor 4 mit der Geschwindigkeit 100 bewegen (z.B. vorwärts fahren)
|
||||
|
||||
| 2. (``Zeile 15``) Zwei Sekunden warten, die Motoren sind immer noch auf -100 und 100 eingestellt, also fahren wir weiter vorwärts
|
||||
|
||||
| 3. (``Zeile 16``) Die Funktion Rückwärtsfahren wird aufgerufen
|
||||
| (``Zeile 5``) Motor 1 wird auf 100 gesetzt
|
||||
| (``Zeile 6``) Motor 4 wird auf -100 gesetzt
|
||||
| (``Zeile 7``) Warte zwei Sekunden und bewege Motor 1 mit der Geschwindigkeit 100 und Motor 4 mit der Geschwindigkeit -100 (z.B. Rückwärtsfahren)
|
||||
|
||||
| 4. Das Programm ist beendet, und alle Motordrehzahlen werden auf 0 gesetzt.
|
||||
|
||||
Wir sehen also, dass wir die Motoren nach der Vorwärts- oder Rückwärtsfunktion wieder auf Geschwindigkeit ``0`` setzen müssen, wenn wir den Roboter anhalten wollen. Für diesen Anwendungsfall können wir eine neue Funktion ``stopMotors()`` schreiben, die die Geschwindigkeit für Motor ``0`` und ``3`` auf ``0`` setzt:
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
import time
|
||||
from compLib.Motor import Motor
|
||||
|
||||
def driveForward():
|
||||
Motor.power(0, -100)
|
||||
Motor.power(3, 100)
|
||||
time.sleep(2)
|
||||
|
||||
def driveBackward():
|
||||
Motor.power(0, 100)
|
||||
Motor.power(3, -100)
|
||||
time.sleep(2)
|
||||
|
||||
def stopMotors():
|
||||
Motor.power(0, 0)
|
||||
Motor.power(3, 0)
|
||||
|
||||
Wenn wir nun vorwärts fahren, dann zwei Sekunden warten und dann wieder rückwärts fahren wollen, können wir die Funktionen wie folgt aufrufen:
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
import time
|
||||
from compLib.Motor import Motor
|
||||
|
||||
def driveForward():
|
||||
Motor.power(0, -100)
|
||||
Motor.power(3, 100)
|
||||
time.sleep(2)
|
||||
|
||||
def driveBackward():
|
||||
Motor.power(0, 100)
|
||||
Motor.power(3, -100)
|
||||
time.sleep(2)
|
||||
|
||||
def stopMotors():
|
||||
Motor.power(0, 0)
|
||||
Motor.power(3, 0)
|
||||
|
||||
driveForward()
|
||||
stopMotors()
|
||||
time.sleep(2)
|
||||
driveBackward()
|
||||
|
||||
Und endlich bekommen wir die Bewegung, die wir uns wünschen.
|
||||
|
||||
**More Optimizations**
|
||||
|
||||
Während der Code für sehr einfache Bewegungen funktioniert, wollen wir normalerweise nicht, dass unsere Funktionen entscheiden, wie lange wir vorwärts fahren. Vielleicht müssen wir manchmal vier Sekunden vorwärts fahren, und manchmal nur eine Sekunde.
|
||||
|
||||
Nehmen wir an, wir wollen vier Sekunden vorwärts fahren. Wir wissen, dass ``driveForward()`` den Roboter zwei Sekunden vorwärts bewegen wird. Also können wir die Funktion einfach zwei Mal aufrufen!
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
import time
|
||||
from compLib.Motor import Motor
|
||||
|
||||
def driveForward():
|
||||
Motor.power(0, -100)
|
||||
Motor.power(3, 100)
|
||||
time.sleep(2)
|
||||
|
||||
driveForward()
|
||||
driveForward()
|
||||
|
||||
Was aber, wenn wir uns nur eine Sekunde vorwärts bewegen wollen? Oder vielleicht drei Sekunden? Mit der Funktion ``driveForward()`` können wir das im Moment nicht machen.
|
||||
|
||||
Stattdessen werden wir die Funktion so umschreiben, dass sie einen Parameter akzeptiert, der die Zeit angibt.
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
import time
|
||||
from compLib.Motor import Motor
|
||||
|
||||
def driveForward(seconds):
|
||||
Motor.power(0, -100)
|
||||
Motor.power(3, 100)
|
||||
time.sleep(seconds)
|
||||
|
||||
driveForward(3)
|
||||
|
||||
Und mit dieser neuen Funktion können wir drei Sekunden lang vorwärts fahren.
|
||||
Wie funktioniert das nun?
|
||||
|
||||
In ``Zeile 4`` definieren wir die Funktion ``driveForward`` und sagen, dass sie einen Parameter ``seconds`` benötigt. Dieser Parameter ist im Grunde eine Variable, die wir uns zum Zeitpunkt der Definition wie einen Platzhalter vorstellen können. Wenn wir die Funktion definieren, wissen wir noch nicht, welchen Wert ``seconds`` haben wird.
|
||||
|
||||
Später in ``Zeile 9``, wenn wir die Funktion aufrufen, übergeben wir den Wert ``3`` an die Funktion und unser Platzhalter ``seconds`` wird den Wert ``3`` haben. Der Roboter wird also drei Sekunden vorwärts fahren.
|
||||
|
||||
Vielleicht wollen wir auch, dass der Roboter mit verschiedenen Geschwindigkeiten fahren kann. Wir können also einen weiteren Parameter mit dem Namen ``speed`` anlegen. Dann werden wir ein Programm schreiben, das den Roboter drei Sekunden mit voller Geschwindigkeit und dann fünf Sekunden mit halber Geschwindigkeit fahren lässt.
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
import time
|
||||
from compLib.Motor import Motor
|
||||
|
||||
def driveForward(seconds, speed):
|
||||
Motor.power(0, -speed)
|
||||
Motor.power(3, speed)
|
||||
time.sleep(seconds)
|
||||
|
||||
driveForward(3, 100)
|
||||
driveForward(5, 50)
|
||||
|
||||
In ``Zeile 9`` wird der Platzhalter ``seconds`` auf ``3`` und die ``Geschwindigkeit`` auf ``100`` gesetzt.
|
||||
In ``Zeile 10`` wird der Platzhalter ``seconds`` auf ``5`` und die ``Geschwindigkeit`` auf ``50`` gesetzt.
|
||||
|
||||
**Bewährte Praktiken**
|
||||
Nun werden wir uns einige weitere Optimierungen und bewährte Verfahren ansehen.
|
||||
|
||||
**1. Wir sollten den Schlafbefehl nicht in die Fahrfunktion einbauen.**
|
||||
|
||||
Wir haben das bis jetzt getan, um ein Gefühl dafür zu bekommen, wie Funktionen funktionieren, und der Einfachheit halber. Später, wenn Sie anfangen, komplexere Programme zu schreiben, sollten Sie dies vermeiden.
|
||||
|
||||
Das Beispiel von oben, in dem wir vorwärts und rückwärts gefahren sind und zwei Sekunden gewartet haben, sollte also wie folgt aussehen:
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
import time
|
||||
from compLib.Motor import Motor
|
||||
|
||||
def driveForward(speed):
|
||||
Motor.power(0, -speed)
|
||||
Motor.power(3, speed)
|
||||
|
||||
def driveBackward(speed):
|
||||
Motor.power(0, speed)
|
||||
Motor.power(3, -speed)
|
||||
|
||||
def stopMotors():
|
||||
Motor.power(0, 0)
|
||||
Motor.power(3, 0)
|
||||
|
||||
driveForward(100) # Set the motors to forward
|
||||
time.sleep(2) # Let the robot drive for 2 seconds
|
||||
stopMotors() # Now stop the robot
|
||||
|
||||
time.sleep(2) # Wait another 2 seconds, robot is not moving
|
||||
|
||||
driveBackward(100) # Now set the motors to a backwards speed
|
||||
time.sleep(2) # Let the robot continue driving for 2 seconds
|
||||
stopMotors() # And finally stop it again
|
||||
|
||||
**Warum ist das so wichtig?**
|
||||
|
||||
Normalerweise schlafen wir nicht sehr viel und führen in dieser Zeit andere Verarbeitungen durch. Zum Beispiel könnten wir ein Bild von der Kamera verarbeiten oder die IR-Sensoren auslesen. Wenn wir also eine Funktion wie ``driveForward()`` aufrufen, können wir davon ausgehen, dass sie im Hintergrund abläuft und wir andere Aufgaben erledigen, während sich der Roboter bewegt, anstatt nur darauf zu warten, dass er fertig wird.
|
||||
|
||||
**2. Fahren Sie nicht zu langsam.**
|
||||
|
||||
Wenn du die Fahrgeschwindigkeit auf eine sehr kleine Zahl einstellst, kann es sein, dass sich der Roboter gar nicht mehr bewegt, weil die Motoren eine bestimmte Menge an Energie benötigen, um den Roboter überhaupt zu bewegen.
|
||||
|
||||
**3. Fahren Sie nicht zu schnell.**
|
||||
|
||||
Wenn du die Fahrgeschwindigkeit auf eine sehr hohe Zahl einstellst (z. B. ``100``), könnte dein Roboter zu schnell für seine Sensoren sein. Dies wird später wichtig sein, wenn wir versuchen, eine schwarze Linie zu erkennen, aber zu schnell über sie fahren.
|
70
_sources/gettingStarted/thridProgram.rst.txt
Normal file
|
@ -0,0 +1,70 @@
|
|||
Mein drittes Programm
|
||||
#####################
|
||||
|
||||
Der offizielle compAIR-Bot ist mit einer Reihe von Sensoren ausgestattet. Die wichtigsten sind die Infrarotsensoren und -sender, die an der Vorderseite des Roboters angebracht sind. Insgesamt gibt es fünf IR-Sensoren.
|
||||
|
||||
Um loszulegen, muss man zunächst das entsprechende Modul wie folgt importieren:
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
from compLib.IRSensor import IRSensor
|
||||
|
||||
|irSensor|
|
||||
|
||||
|
||||
Wie im obigen Diagramm zu sehen ist, verfügt jeder Sensor auch über einen entsprechenden IR-Sender / Emitter. Dieser Sender kann mit ``IRSensor.set(port, enable)`` aktiviert werden.
|
||||
|
||||
Schalten wir nun alle fünf Sender ein:
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
from compLib.IRSensor import IRSensor
|
||||
|
||||
IRSensor.enable()
|
||||
|
||||
Diese fünf verschiedenen Sensoren befinden sich an der Vorderseite des Roboters und sind wichtig, um schwarze Linien zu erkennen.
|
||||
|
||||
Es ist sehr einfach, den Wert der Sensoren abzulesen:
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
from compLib.IRSensor import IRSensor
|
||||
|
||||
IRSensor.enable()
|
||||
|
||||
if IRSensor.read_all()[0] > 500:
|
||||
print("high")
|
||||
else:
|
||||
print("low")
|
||||
|
||||
**Erkennen einer schwarzen Linie**
|
||||
Um den IR-Sensor zu testen, kannst du deinen Roboter auf eine schwarze Linie stellen. Der Sensor in der Mitte sollte auf der schwarzen Linie liegen.
|
||||
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
from compLib.IRSensor import IRSensor
|
||||
|
||||
IRSensor.enable()
|
||||
COLOR_BREAK = 900
|
||||
|
||||
if IRSensor.read_all()[2] > COLOR_BREAK:
|
||||
print("Robot is standing on a black line")
|
||||
else:
|
||||
print("Robot is NOT standing on a black line")
|
||||
|
||||
Wenn das Programm ausgeführt wird, zeigt es an, dass der Roboter auf einer schwarzen Linie steht, wenn sich der mittlere IR-Sensor des Roboters über einer schwarzen Linie befindet, und es zeigt an, dass der Roboter NICHT auf einer schwarzen Linie steht, wenn sich der mittlere IR-Sensor nicht über einer Linie befindet.
|
||||
|
||||
| In ``Zeile 1`` importieren wir das ``IRSensor``-Modul, das zur Kommunikation mit dem IR-Sensor-Board verwendet werden kann.
|
||||
| In ``Zeile 3`` wird der Sensor mit der Nummer ``3`` aktiviert. Wenn wir einen Sensor nicht aktivieren, können wir ihn nicht in unserem Programm verwenden.
|
||||
| In ``Zeile 4`` stellen wir einen Farbschwellenwert von ``900`` ein, mit dem wir später prüfen werden, ob der Sensorwert unter oder über diesem Schwellenwert liegt. Unterhalb bedeutet, dass sich eine helle Farbe unter dem IR-Sensor befindet und ein höherer Wert als ``900`` bedeutet, dass sich eine dunkle Farbe unter dem IR-Sensor befindet.
|
||||
|
||||
| In ``Zeile 6`` lesen wir den Sensor Nummer ``2`` aus und prüfen, ob der Wert über dem von uns definierten Schwellenwert von ``900`` liegt. Wenn das der Fall ist, hat der IR-Sensor eine schwarze Linie erkannt.
|
||||
|
||||
Wir werden nun das Programm so ändern, dass es alle ``0.1`` Sekunden prüft, ob sich eine schwarze Linie unter dem Roboter befindet, und wenn dies der Fall ist, eine Meldung ausgibt.
|
||||
|
||||
|
||||
.. |irSensor| image:: images/07_irSensor.webp
|
77
_sources/gettingStarted/wifi.rst.txt
Normal file
|
@ -0,0 +1,77 @@
|
|||
.. _gettingStarted_wifi:
|
||||
|
||||
WLAN-Verbindung herstellen
|
||||
##########################
|
||||
|
||||
Schritt für Schritt - macOS
|
||||
---------------------------
|
||||
1. SD-Karte aus dem Raspberry Pi bzw. Roboter entnehmen.
|
||||
2. Einstecken der SD-Karte in den Computer
|
||||
3. Öffnen der SD-Karte mit dem Namen "boot" |bootImage|
|
||||
4. Generieren des PSK auf `https://www.wireshark.org/tools/wpa-psk.html <https://www.wireshark.org/tools/wpa-psk.html>`_ |pskImage|
|
||||
5. Öffnen der Datei "wpa_supplicant.conf" auf der SD-Karte
|
||||
6. Einfügen der Konfiguration. Dabei muss die SSID und der vorher generierte PSK eingesetzt werden ::
|
||||
|
||||
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
||||
update_config=1
|
||||
country=AT
|
||||
|
||||
network={
|
||||
ssid="EinTollerNameFürDasWlan"
|
||||
psk="98117b165a48f25cbe36f288ddf597729a40feeea93054c19bfa8e5eab238541"
|
||||
}
|
||||
|
||||
7. Speichern, Auswerfen und wieder in den Raspberry Pi einbauen
|
||||
8. Starten des Roboters
|
||||
9. Die IP-Adresse sollte nun am Roboter angezeigt werden
|
||||
|
||||
.. |bootImage| image:: images/01_boot.png
|
||||
.. |pskImage| image:: images/02_psk.png
|
||||
|
||||
Weitere Informationen
|
||||
---------------------
|
||||
Die "wpa_supplicant.conf" Datei wird beim Start des Rpasberry Pi automatisch an den richtigen Ort kopiert, damit sich der Roboter zum Wlan verbindet.
|
||||
Eine genauere Anleitung wird vom Hersteller des Raspberry Pi `hier <https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-networking-2>`_ bereitgestellt.
|
||||
|
||||
Fehlerbehandlung
|
||||
----------------
|
||||
Sollte es dazu kommen, dass der Roboter nicht automatisch die Verbindung mit dem Netzwerk herstellt, kann eine Kabelgebundene Verbindung zur Diagnose von Fehlern genutzt werden.
|
||||
Dabei wird automatisch die IP-Adresse der Verbindung "eth" am Roboter angezeigt. Nach der erfolgreichen Verbindung zum Roboter mittels SSH kann die "wpa_cli" zur Fehlerbehandlung verwendet werden:
|
||||
::
|
||||
|
||||
> wpa_cli
|
||||
wpa_cli v2.9
|
||||
Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi> and contributors
|
||||
|
||||
This software may be distributed under the terms of the BSD license.
|
||||
See README for more details.
|
||||
|
||||
|
||||
Selected interface 'p2p-dev-wlan0'
|
||||
|
||||
Interactive mode
|
||||
|
||||
> interface wlan0
|
||||
Connected to interface 'wlan0.
|
||||
> scan
|
||||
OK
|
||||
<3>CTRL-EVENT-SCAN-STARTED
|
||||
<3>CTRL-EVENT-SCAN-RESULTS
|
||||
> scan_result
|
||||
bssid / frequency / signal level / flags / ssid
|
||||
68:02:b8:0c:d7:47 2462 -66 [WPA2-PSK-CCMP][ESS] WG
|
||||
68:02:b8:0c:d7:40 5220 -63 [WPA2-PSK-CCMP][ESS] WG
|
||||
34:2c:c4:da:dd:b9 5200 -65 [WPA-PSK-TKIP][WPA2-PSK-CCMP][WPS][ESS] WLAN10573403
|
||||
98:da:c4:e5:21:d0 2437 -57 [WPA2-PSK-CCMP][ESS] WG
|
||||
34:2c:c4:da:dd:c6 2412 -52 [WPA-PSK-][WPA2-PSK-CCMP+TKIP][WPS][ESS] WLAN10573403
|
||||
20:83:f8:07:5b:90 2467 -67 [WPA2-PSK-CCMP][WPS][ESS] A1-075b8c
|
||||
7c:39:53:94:49:82 5280 -77 [WPA2-PSK-CCMP][WPS][ESS] A1-944980-5G
|
||||
7c:39:53:94:49:81 2427 -68 [WPA2-PSK-CCMP][WPS][ESS] A1-944980
|
||||
90:fd:73:ac:d3:27 2452 -72 [WPA2-PSK-CCMP][WPS][ESS] Drei_H288A_24G_eKy5
|
||||
50:e0:39:3c:e5:80 5180 -82 [WPA2-PSK-CCMP][WPS][ESS] A1-393CE57F
|
||||
90:fd:73:ac:d3:28 5500 -83 [WPA2-PSK-CCMP][WPS][ESS] Drei_H288A_5G_eKy5
|
||||
68:02:b8:41:42:f9 5180 -84 [WPA-PSK-TKIP][WPA2-PSK-CCMP][WPS][ESS] WLAN18792472
|
||||
34:2c:c4:30:3c:65 5180 -89 [WPA-PSK-TKIP][WPA2-PSK-CCMP][WPS][ESS] witt
|
||||
fa:0d:ac:d3:40:d4 2467 -80 [WPA2-PSK-CCMP][WPS][ESS][P2P] DIRECT-d4-HP M28 LaserJet
|
||||
0e:84:dc:14:ac:27 2467 -85 [WPA2-PSK-CCMP][WPS][ESS][P2P] DIRECT-wo-BRAVIA
|
||||
>
|
|
@ -1,7 +1,7 @@
|
|||
.. image:: images/compair-logo-white.svg
|
||||
|
||||
Competition Robot Library
|
||||
#############################
|
||||
Dokumentation des Roboters
|
||||
##########################
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
@ -11,9 +11,11 @@ Contents
|
|||
*********
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 5
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
self
|
||||
gettingStarted/index.rst
|
||||
software/installation.rst
|
||||
faq.rst
|
||||
other/usage
|
||||
lib/*
|
||||
lib/index.rst
|
||||
|
|
50
_sources/lib/classes/Motor.rst.txt
Normal file
|
@ -0,0 +1,50 @@
|
|||
.. _lib_motor:
|
||||
|
||||
Motoren
|
||||
********
|
||||
|
||||
Dokumentation der Klasse
|
||||
========================
|
||||
|
||||
.. autoclass:: compLib.Motor.Motor
|
||||
:members:
|
||||
|
||||
Genauere Informationen
|
||||
======================
|
||||
|
||||
Power vs Speed vs PulseWidth
|
||||
-----------------------------
|
||||
Zur ansteuerung der Motoren kann entweder ``Motor.power(...)``, ``Motor.speed(...)`` oder ``Motor.pulse_width(...)``` verwendet werden.
|
||||
Der Unterschied der 3 Funktionen liegt dabei in der Einheit des 2. Parameters.
|
||||
|
||||
| Bei ``Motor.power()`` wird dabei ein Wert zwischen -100% und 100% der maximalen Geschwindigkeit angegeben.
|
||||
| ``Motor.speed()`` verwendet die Encoder um die Geschwindigkeit der Motoren mittels closed-loop zu steuern. Diese Funktion sollte nur verwendet werden, wenn ``Motor.power()`` nicht zur Ansteuerung ausreicht.
|
||||
| ``Motor.pulse_width()`` stellt die Geschwindigkeit des Motors mittels der Pulsbreite der PWM-Steuerung des Motors ein. Diese Funktion ist so nah an der Hardware wie möglich und sollte auch nur verwendet werden, wenn es einen expliziten Grund dafür gibt.
|
||||
|
||||
Normal vs Multiple
|
||||
------------------
|
||||
Der Aufruf der funktionen kann entweder über ``Motor.power(port, percent)`` oder ``Motor.power((port, percent), (port, percent), ..)`` erfolgen.
|
||||
Der zweite Aufruf ermöglicht dem Entwickler dabei beide Motoren in einem Aufruf anzusteuern und bringt einen kleinen Vorteil in der Leistungsfähigkeit der Software.
|
||||
|
||||
|
||||
Beispiele
|
||||
=========
|
||||
|
||||
Vorwärts fahren
|
||||
---------------
|
||||
|
||||
Mit folgenden Programm drehen sich beide Motoren mit 50% ihrer maximalen Geschwindigkeit.
|
||||
Dabei ist zu beachten, dass ein Motor in die entgegengesetzte Richtung zum aneren Motor gedreht werden muss, da diese spiegelverkehrt montiert sind.
|
||||
|
||||
Zusätzlich ist ein ``time.sleep(5)`` notwendig, welches das Programm für 5 Sekunden pausiert. Diese Pause wird benötigt, da der Roboter automatisch alle Motoren beim Ende des Progammes deaktiviert.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from compLib.Motor import Motor
|
||||
import time
|
||||
|
||||
Motor.power(0, -50)
|
||||
Motor.power(3, 50)
|
||||
|
||||
time.sleep(5)
|
||||
|
8
_sources/lib/index.rst.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
compLib
|
||||
#######
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 5
|
||||
:glob:
|
||||
|
||||
classes/*
|
|
@ -1,7 +1,10 @@
|
|||
.. _other_usage:
|
||||
|
||||
Usage
|
||||
######
|
||||
Beispiele
|
||||
#########
|
||||
|
||||
Vorwärts und rückwärts fahren
|
||||
*****************************
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
|
12
_sources/software/installation.rst.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
.. _software_installation:
|
||||
|
||||
Installationsanweisungen
|
||||
########################
|
||||
|
||||
Diese Anleitung dient dazu die Software auf dem Roboter neu aufzusetzen. Im normalen Gebraucht sollte dies jedoch nicht notwendig sein.
|
||||
|
||||
Betriebssystem aufsetzen
|
||||
========================
|
||||
|
||||
Als Basis wird für den Roboter Raspberry Pi OS (64-bit) verwendet. Das 32-Bit Betriebssystem wird nicht unterstützt, da die Software-Komponenten nur für aarch64 bzw. arm64/v8 kompiliert werden.
|
||||
Genauere Informationen sind `hier <https://www.raspberrypi.com/software/operating-systems/>`_ zu finden.
|
2506
_static/_stemmer.js
Normal file
|
@ -1,7 +1,7 @@
|
|||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
VERSION: '0.2.3',
|
||||
LANGUAGE: 'None',
|
||||
LANGUAGE: 'de',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
FILE_SUFFIX: '.html',
|
||||
|
|
63
_static/translations.js
Normal file
|
@ -0,0 +1,63 @@
|
|||
Documentation.addTranslations({
|
||||
"locale": "de",
|
||||
"messages": {
|
||||
"%(filename)s — %(docstitle)s": "",
|
||||
"© <a href=\"%(path)s\">Copyright</a> %(copyright)s.": "",
|
||||
"© Copyright %(copyright)s.": "",
|
||||
", in ": ", in ",
|
||||
"About these documents": "\u00dcber dieses Dokument",
|
||||
"Automatically generated list of changes in version %(version)s": "Automatisch generierte Liste der \u00c4nderungen in Version %(version)s",
|
||||
"C API changes": "C API-\u00c4nderungen",
|
||||
"Changes in Version %(version)s — %(docstitle)s": "",
|
||||
"Collapse sidebar": "Seitenleiste einklappen",
|
||||
"Complete Table of Contents": "Vollst\u00e4ndiges Inhaltsverzeichnis",
|
||||
"Contents": "Inhalt",
|
||||
"Copyright": "Copyright",
|
||||
"Created using <a href=\"http://sphinx-doc.org/\">Sphinx</a> %(sphinx_version)s.": "Mit <a href=\"http://sphinx-doc.org/\">Sphinx</a> %(sphinx_version)s erstellt.",
|
||||
"Expand sidebar": "Seitenleiste ausklappen",
|
||||
"Full index on one page": "Gesamtes Stichwortverzeichnis auf einer Seite",
|
||||
"General Index": "Stichwortverzeichnis",
|
||||
"Global Module Index": "Globaler Modulindex",
|
||||
"Go": "Los",
|
||||
"Hide Search Matches": "Suchergebnisse ausblenden",
|
||||
"Index": "Stichwortverzeichnis",
|
||||
"Index – %(key)s": "Stichwortverzeichnis – %(key)s",
|
||||
"Index pages by letter": "Stichwortverzeichnis nach Anfangsbuchstabe",
|
||||
"Indices and tables:": "Verzeichnisse und Tabellen:",
|
||||
"Last updated on %(last_updated)s.": "Zuletzt aktualisiert am %(last_updated)s.",
|
||||
"Library changes": "Bibliotheks-\u00c4nderungen",
|
||||
"Navigation": "Navigation",
|
||||
"Next topic": "N\u00e4chstes Thema",
|
||||
"Other changes": "Andere \u00c4nderungen",
|
||||
"Overview": "\u00dcbersicht",
|
||||
"Permalink to this definition": "Link zu dieser Definition",
|
||||
"Permalink to this headline": "Link zu dieser \u00dcberschrift",
|
||||
"Please activate JavaScript to enable the search\n functionality.": "Bitte aktivieren Sie JavaScript, wenn Sie die Suchfunktion nutzen wollen.",
|
||||
"Preparing search...": "Suche wird vorbereitet...",
|
||||
"Previous topic": "Vorheriges Thema",
|
||||
"Quick search": "Schnellsuche",
|
||||
"Search": "Suche",
|
||||
"Search Page": "Suche",
|
||||
"Search Results": "Suchergebnisse",
|
||||
"Search finished, found %s page(s) matching the search query.": "Die Suche ist fertig, es wurde(n) %s Seite(n) mit Treffern gefunden.",
|
||||
"Search within %(docstitle)s": "Suche in %(docstitle)s",
|
||||
"Searching": "Suchen",
|
||||
"Searching for multiple words only shows matches that contain\n all words.": "",
|
||||
"Show Source": "Quellcode anzeigen",
|
||||
"Table of Contents": "Inhaltsverzeichnis",
|
||||
"This Page": "Diese Seite",
|
||||
"Welcome! This is": "Willkommen! Dies ist",
|
||||
"Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Ihre Suche ergab keine Treffer. Bitte stellen Sie sicher, dass alle W\u00f6rter richtig geschrieben sind und gen\u00fcgend Kategorien ausgew\u00e4hlt sind.",
|
||||
"all functions, classes, terms": "alle Funktionen, Klassen, Begriffe",
|
||||
"can be huge": "kann gro\u00df sein",
|
||||
"last updated": "zuletzt aktualisiert",
|
||||
"lists all sections and subsections": "Liste aller Kapitel und Unterkapitel",
|
||||
"next chapter": "n\u00e4chstes Kapitel",
|
||||
"previous chapter": "vorheriges Kapitel",
|
||||
"quick access to all modules": "schneller Zugriff auf alle Module",
|
||||
"search": "suchen",
|
||||
"search this documentation": "durchsuche diese Dokumentation",
|
||||
"the documentation for": "die Dokumentation f\u00fcr"
|
||||
},
|
||||
"plural_expr": "(n != 1)"
|
||||
});
|
228
faq.html
Normal file
|
@ -0,0 +1,228 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>FAQ — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Stichwortverzeichnis" href="genindex.html" />
|
||||
<link rel="search" title="Suche" href="search.html" />
|
||||
<link rel="next" title="Beispiele" href="other/usage.html" />
|
||||
<link rel="prev" title="Installationsanweisungen" href="software/installation.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="gettingStarted/index.html">Erste Schritte</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">FAQ</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#was-ist-das-passwort-fur-die-entwicklungsumgebung">Was ist das Passwort für die Entwicklungsumgebung?</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#wie-verbinde-ich-mich-zur-entwicklungsumgebung">Wie verbinde ich mich zur Entwicklungsumgebung?</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="index.html">CompLib</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>FAQ</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="_sources/faq.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="faq">
|
||||
<h1>FAQ<a class="headerlink" href="#faq" title="Link zu dieser Überschrift">¶</a></h1>
|
||||
<div class="section" id="was-ist-das-passwort-fur-die-entwicklungsumgebung">
|
||||
<h2>Was ist das Passwort für die Entwicklungsumgebung?<a class="headerlink" href="#was-ist-das-passwort-fur-die-entwicklungsumgebung" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">compair</span></code></p>
|
||||
</div>
|
||||
<div class="section" id="wie-verbinde-ich-mich-zur-entwicklungsumgebung">
|
||||
<h2>Wie verbinde ich mich zur Entwicklungsumgebung?<a class="headerlink" href="#wie-verbinde-ich-mich-zur-entwicklungsumgebung" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<p>See <a class="reference internal" href="gettingStarted/codeServer.html#gettingstarted-codeserver"><span class="std std-ref">Programmierumgebung</span></a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="other/usage.html" class="btn btn-neutral float-right" title="Beispiele" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="software/installation.html" class="btn btn-neutral float-left" title="Installationsanweisungen" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
289
genindex.html
|
@ -1,13 +1,13 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Index — CompLib 0.2.3 documentation</title>
|
||||
<title>Stichwortverzeichnis — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
|
@ -29,12 +29,13 @@
|
|||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="#" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="index" title="Stichwortverzeichnis" href="#" />
|
||||
<link rel="search" title="Suche" href="search.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -62,7 +63,7 @@
|
|||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
@ -80,21 +81,11 @@
|
|||
|
||||
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="index.html">Competition Robot Library</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Usage</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Api.html">Api</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Aruco.html">Aruco</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Display.html">Display</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Encoder.html">Encoder</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Linefollower.html">Linefollower Examples</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Logging.html">Logging</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Odom.html">Odometry</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/QC.html">Quality Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Robot.html">Robot</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Vision.html">Vision</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="gettingStarted/index.html">Erste Schritte</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -141,7 +132,7 @@
|
|||
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Index</li>
|
||||
<li>Stichwortverzeichnis</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
@ -159,178 +150,26 @@
|
|||
<div itemprop="articleBody">
|
||||
|
||||
|
||||
<h1 id="index">Index</h1>
|
||||
<h1 id="index">Stichwortverzeichnis</h1>
|
||||
|
||||
<div class="genindex-jumpbox">
|
||||
<a href="#_"><strong>_</strong></a>
|
||||
| <a href="#A"><strong>A</strong></a>
|
||||
| <a href="#C"><strong>C</strong></a>
|
||||
| <a href="#D"><strong>D</strong></a>
|
||||
| <a href="#E"><strong>E</strong></a>
|
||||
| <a href="#G"><strong>G</strong></a>
|
||||
| <a href="#H"><strong>H</strong></a>
|
||||
| <a href="#I"><strong>I</strong></a>
|
||||
| <a href="#L"><strong>L</strong></a>
|
||||
| <a href="#M"><strong>M</strong></a>
|
||||
| <a href="#O"><strong>O</strong></a>
|
||||
<a href="#M"><strong>M</strong></a>
|
||||
| <a href="#P"><strong>P</strong></a>
|
||||
| <a href="#R"><strong>R</strong></a>
|
||||
| <a href="#S"><strong>S</strong></a>
|
||||
| <a href="#T"><strong>T</strong></a>
|
||||
| <a href="#U"><strong>U</strong></a>
|
||||
| <a href="#W"><strong>W</strong></a>
|
||||
|
||||
</div>
|
||||
<h2 id="_">_</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Vision.html#compLib.Vision.__Streaming">__Streaming (class in compLib.Vision)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="A">A</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Motor.html#compLib.Motor.Motor.active_break">active_break() (compLib.Motor.Motor static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Motor.html#compLib.Motor.Motor.all_off">all_off() (compLib.Motor.Motor static method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Robot.html#compLib.Robot.Robot.ARBOR_LENGTH_M">ARBOR_LENGTH_M (compLib.Robot.Robot attribute)</a>
|
||||
</li>
|
||||
<li><a href="lib/Robot.html#compLib.Robot.Robot.ARBOR_LENGTH_MM">ARBOR_LENGTH_MM (compLib.Robot.Robot attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="C">C</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Display.html#compLib.Display.Display.clear">clear() (compLib.Display.Display static method)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="lib/Encoder.html#compLib.Encoder.Encoder.clear">(compLib.Encoder.Encoder static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Odom.html#compLib.Odom.Odom.clear">(compLib.Odom.Odom static method)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Encoder.html#compLib.Encoder.Encoder.clear_all">clear_all() (compLib.Encoder.Encoder static method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="D">D</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Display.html#compLib.Display.Display">Display (class in compLib.Display)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Api.html#compLib.Api.DoubleElim">DoubleElim (class in compLib.Api)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="E">E</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Encoder.html#compLib.Encoder.Encoder">Encoder (class in compLib.Encoder)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="G">G</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Api.html#compLib.Api.Seeding.get_cargo">get_cargo() (compLib.Api.Seeding static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Api.html#compLib.Api.Seeding.get_delivery">get_delivery() (compLib.Api.Seeding static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Vision.html#compLib.Vision.__Streaming.get_frame">get_frame() (compLib.Vision.__Streaming method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Api.html#compLib.Api.Seeding.get_garbage">get_garbage() (compLib.Api.Seeding static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Api.html#compLib.Api.DoubleElim.get_goal">get_goal() (compLib.Api.DoubleElim static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Api.html#compLib.Api.DoubleElim.get_items">get_items() (compLib.Api.DoubleElim static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Logging.html#compLib.LogstashLogging.Logging.get_logger">get_logger() (compLib.LogstashLogging.Logging static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Api.html#compLib.Api.Seeding.get_material">get_material() (compLib.Api.Seeding static method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Api.html#compLib.Api.DoubleElim.get_meteoroids">get_meteoroids() (compLib.Api.DoubleElim static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Motor.html#compLib.Motor.Motor.get_motor_curve">get_motor_curve() (compLib.Motor.Motor static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Odom.html#compLib.Odom.Odom.get_odom">get_odom() (compLib.Odom.Odom static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Api.html#compLib.Api.DoubleElim.get_opponent">get_opponent() (compLib.Api.DoubleElim static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Odom.html#compLib.Odom.Odometry.get_orientation">get_orientation() (compLib.Odom.Odometry method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Api.html#compLib.Api.DoubleElim.get_position">get_position() (compLib.Api.DoubleElim static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Api.html#compLib.Api.DoubleElim.get_scores">get_scores() (compLib.Api.DoubleElim static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Odom.html#compLib.Odom.Odometry.get_x">get_x() (compLib.Odom.Odometry method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Odom.html#compLib.Odom.Odometry.get_y">get_y() (compLib.Odom.Odometry method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="H">H</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Encoder.html#compLib.Encoder.Encoder.handle_wrap">handle_wrap() (compLib.Encoder.Encoder static method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="I">I</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/IRSensor.html#compLib.IRSensor.IRSensor">IRSensor (class in compLib.IRSensor)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="L">L</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Robot.html#compLib.Robot.Robot.LEFT_PORT">LEFT_PORT (compLib.Robot.Robot attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Api.html#compLib.Api.Seeding.list_cargo">list_cargo() (compLib.Api.Seeding static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Logging.html#compLib.LogstashLogging.Logging">Logging (class in compLib.LogstashLogging)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="M">M</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Motor.html#compLib.Motor.Motor">Motor (class in compLib.Motor)</a>
|
||||
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor">Motor (Klasse in compLib.Motor)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="O">O</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Odom.html#compLib.Odom.Odom">Odom (class in compLib.Odom)</a>
|
||||
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.multiple_power">multiple_power() (statische Methode von compLib.Motor.Motor)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Odom.html#compLib.Odom.Odometry">Odometry (class in compLib.Odom)</a>
|
||||
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.multiple_pulse_width">multiple_pulse_width() (statische Methode von compLib.Motor.Motor)</a>
|
||||
</li>
|
||||
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.multiple_speed">multiple_speed() (statische Methode von compLib.Motor.Motor)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
@ -338,45 +177,11 @@
|
|||
<h2 id="P">P</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Api.html#compLib.Api.Position">Position (class in compLib.Api)</a>
|
||||
</li>
|
||||
<li><a href="lib/Motor.html#compLib.Motor.Motor.power">power() (compLib.Motor.Motor static method)</a>
|
||||
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.power">power() (statische Methode von compLib.Motor.Motor)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Motor.html#compLib.Motor.Motor.power_raw">power_raw() (compLib.Motor.Motor static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Vision.html#compLib.Vision.__Streaming.publish_frame">publish_frame() (compLib.Vision.__Streaming method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Motor.html#compLib.Motor.Motor.pwm">pwm() (compLib.Motor.Motor static method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="R">R</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Encoder.html#compLib.Encoder.Encoder.read">read() (compLib.Encoder.Encoder static method)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="lib/IRSensor.html#compLib.IRSensor.IRSensor.read">(compLib.IRSensor.IRSensor static method)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="lib/Encoder.html#compLib.Encoder.Encoder.read_all">read_all() (compLib.Encoder.Encoder static method)</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="lib/IRSensor.html#compLib.IRSensor.IRSensor.read_all">(compLib.IRSensor.IRSensor static method)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Encoder.html#compLib.Encoder.Encoder.read_all_raw">read_all_raw() (compLib.Encoder.Encoder static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Encoder.html#compLib.Encoder.Encoder.read_raw">read_raw() (compLib.Encoder.Encoder static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Robot.html#compLib.Robot.Robot.RIGHT_PORT">RIGHT_PORT (compLib.Robot.Robot attribute)</a>
|
||||
</li>
|
||||
<li><a href="lib/Robot.html#compLib.Robot.Robot">Robot (class in compLib.Robot)</a>
|
||||
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.pulse_width">pulse_width() (statische Methode von compLib.Motor.Motor)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
@ -384,53 +189,7 @@
|
|||
<h2 id="S">S</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Api.html#compLib.Api.Seeding">Seeding (class in compLib.Api)</a>
|
||||
</li>
|
||||
<li><a href="lib/Servo.html#compLib.Servo.Servo">Servo (class in compLib.Servo)</a>
|
||||
</li>
|
||||
<li><a href="lib/IRSensor.html#compLib.IRSensor.IRSensor.set">set() (compLib.IRSensor.IRSensor static method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Logging.html#compLib.LogstashLogging.Logging.set_debug">set_debug() (compLib.LogstashLogging.Logging static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Motor.html#compLib.Motor.Motor.set_motor_curve">set_motor_curve() (compLib.Motor.Motor static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Servo.html#compLib.Servo.Servo.set_position">set_position() (compLib.Servo.Servo static method)</a>
|
||||
</li>
|
||||
<li><a href="lib/Servo.html#compLib.Servo.Servo.setup_position">setup_position() (compLib.Servo.Servo static method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="T">T</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Robot.html#compLib.Robot.Robot.TICKS_PER_METER">TICKS_PER_METER (compLib.Robot.Robot attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Robot.html#compLib.Robot.Robot.TICKS_PER_TURN">TICKS_PER_TURN (compLib.Robot.Robot attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="U">U</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Odom.html#compLib.Odom.Odom.update">update() (compLib.Odom.Odom static method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="W">W</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Robot.html#compLib.Robot.Robot.WHEEL_CIRCUMFERENCE_MM">WHEEL_CIRCUMFERENCE_MM (compLib.Robot.Robot attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="lib/Display.html#compLib.Display.Display.write">write() (compLib.Display.Display static method)</a>
|
||||
<li><a href="lib/classes/Motor.html#compLib.Motor.Motor.speed">speed() (statische Methode von compLib.Motor.Motor)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
@ -455,11 +214,11 @@
|
|||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
|
|
234
gettingStarted/codeServer.html
Normal file
|
@ -0,0 +1,234 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Programmierumgebung — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
|
||||
<link rel="search" title="Suche" href="../search.html" />
|
||||
<link rel="next" title="Mein erstes Programm" href="firstProgram.html" />
|
||||
<link rel="prev" title="WLAN-Verbindung herstellen" href="wifi.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">Programmierumgebung</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#verbindung-zur-entwicklungsumgebung-herstellen">Verbindung zur Entwicklungsumgebung herstellen</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="firstProgram.html">Mein erstes Programm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="secondProgram.html">Mein zweites Programm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="thridProgram.html">Mein drittes Programm</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">CompLib</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li><a href="index.html">Erste Schritte</a> »</li>
|
||||
|
||||
<li>Programmierumgebung</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/gettingStarted/codeServer.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="programmierumgebung">
|
||||
<span id="gettingstarted-codeserver"></span><h1>Programmierumgebung<a class="headerlink" href="#programmierumgebung" title="Link zu dieser Überschrift">¶</a></h1>
|
||||
<p>Als Umgebung zur Programmierung des Roboters wird <a class="reference external" href="https://github.com/coder/code-server">code-server</a> eingesetzt, welche bereits am Roboter vorinstalliert ist.</p>
|
||||
<div class="section" id="verbindung-zur-entwicklungsumgebung-herstellen">
|
||||
<h2>Verbindung zur Entwicklungsumgebung herstellen<a class="headerlink" href="#verbindung-zur-entwicklungsumgebung-herstellen" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<p>Am Roboter wird die IP-Adresse des Raspberry Pi angezeigt. Um nun die Verbindung herzustellen, muss man in einem Web-Browser einfach <code class="docutils literal notranslate"><span class="pre"><roboter_ip>:8080</span></code> eingeben.
|
||||
Das Passwort für Visual Studio Code im Browser ist <code class="docutils literal notranslate"><span class="pre">compair</span></code>!</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="firstProgram.html" class="btn btn-neutral float-right" title="Mein erstes Programm" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="wifi.html" class="btn btn-neutral float-left" title="WLAN-Verbindung herstellen" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
238
gettingStarted/firstProgram.html
Normal file
|
@ -0,0 +1,238 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Mein erstes Programm — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
|
||||
<link rel="search" title="Suche" href="../search.html" />
|
||||
<link rel="next" title="Mein zweites Programm" href="secondProgram.html" />
|
||||
<link rel="prev" title="Programmierumgebung" href="codeServer.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="codeServer.html">Programmierumgebung</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">Mein erstes Programm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="secondProgram.html">Mein zweites Programm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="thridProgram.html">Mein drittes Programm</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">CompLib</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li><a href="index.html">Erste Schritte</a> »</li>
|
||||
|
||||
<li>Mein erstes Programm</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/gettingStarted/firstProgram.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="mein-erstes-programm">
|
||||
<h1>Mein erstes Programm<a class="headerlink" href="#mein-erstes-programm" title="Link zu dieser Überschrift">¶</a></h1>
|
||||
<p>Um mit der Programmierung zu beginnen, müssen wir zunächst einen neuen Ordner erstellen, in dem alle unsere Python-Dateien gespeichert werden.
|
||||
<img alt="codeServerFolder" src="../_images/06_codeServerFolder.png" /></p>
|
||||
<p>Sie können diesen Ordner nennen, wie Sie wollen, für dieses Beispiel heißt er <code class="docutils literal notranslate"><span class="pre">compAIR</span></code>.
|
||||
Im nächsten Schritt erstellen wir unsere Datei <code class="docutils literal notranslate"><span class="pre">main.py</span></code>.
|
||||
<img alt="codeServerFile" src="../_images/03_codeServerFile.png" /></p>
|
||||
<p>Dann können wir beginnen, unseren Code in diese Datei zu schreiben.</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="s2">"Hallo Welt"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Praktischerweise können wir die Datei auch über die VS-Code-Plattform ausführen.
|
||||
<img alt="codeServerRun" src="../_images/04_codeServerRun.png" /></p>
|
||||
<p>Dann öffnet sich ein Terminal, der die Ausgabe unseres Programms anzeigt.
|
||||
<img alt="codeServerTerminal" src="../_images/05_codeServerTerminal.png" /></p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="secondProgram.html" class="btn btn-neutral float-right" title="Mein zweites Programm" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="codeServer.html" class="btn btn-neutral float-left" title="Programmierumgebung" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
247
gettingStarted/index.html
Normal file
|
@ -0,0 +1,247 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Erste Schritte — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
|
||||
<link rel="search" title="Suche" href="../search.html" />
|
||||
<link rel="next" title="WLAN-Verbindung herstellen" href="wifi.html" />
|
||||
<link rel="prev" title="Dokumentation des Roboters" href="../index.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Erste Schritte</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="codeServer.html">Programmierumgebung</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="firstProgram.html">Mein erstes Programm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="secondProgram.html">Mein zweites Programm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="thridProgram.html">Mein drittes Programm</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">CompLib</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Erste Schritte</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/gettingStarted/index.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="erste-schritte">
|
||||
<h1>Erste Schritte<a class="headerlink" href="#erste-schritte" title="Link zu dieser Überschrift">¶</a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="wifi.html#schritt-fur-schritt-macos">Schritt für Schritt - macOS</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="wifi.html#weitere-informationen">Weitere Informationen</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="wifi.html#fehlerbehandlung">Fehlerbehandlung</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="codeServer.html">Programmierumgebung</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="codeServer.html#verbindung-zur-entwicklungsumgebung-herstellen">Verbindung zur Entwicklungsumgebung herstellen</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="firstProgram.html">Mein erstes Programm</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="secondProgram.html">Mein zweites Programm</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="secondProgram.html#motoren-ansteuern">Motoren ansteuern</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="secondProgram.html#gerade-fahren">Gerade fahren</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="secondProgram.html#mehr-fahren">Mehr fahren</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="thridProgram.html">Mein drittes Programm</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="wifi.html" class="btn btn-neutral float-right" title="WLAN-Verbindung herstellen" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="../index.html" class="btn btn-neutral float-left" title="Dokumentation des Roboters" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
632
gettingStarted/secondProgram.html
Normal file
|
@ -0,0 +1,632 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Mein zweites Programm — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
|
||||
<link rel="search" title="Suche" href="../search.html" />
|
||||
<link rel="next" title="Mein drittes Programm" href="thridProgram.html" />
|
||||
<link rel="prev" title="Mein erstes Programm" href="firstProgram.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="codeServer.html">Programmierumgebung</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="firstProgram.html">Mein erstes Programm</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">Mein zweites Programm</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#motoren-ansteuern">Motoren ansteuern</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#gerade-fahren">Gerade fahren</a><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#mehr-fahren">Mehr fahren</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="thridProgram.html">Mein drittes Programm</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">CompLib</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li><a href="index.html">Erste Schritte</a> »</li>
|
||||
|
||||
<li>Mein zweites Programm</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/gettingStarted/secondProgram.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="mein-zweites-programm">
|
||||
<h1>Mein zweites Programm<a class="headerlink" href="#mein-zweites-programm" title="Link zu dieser Überschrift">¶</a></h1>
|
||||
<div class="section" id="motoren-ansteuern">
|
||||
<h2>Motoren ansteuern<a class="headerlink" href="#motoren-ansteuern" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<p>Um die Motoren des Roboters zu steuern, müssen wir zunächst das entsprechende Python-Modul am Anfang der Datei importieren. Dann können wir Motor.power(port, power) verwenden, um den Motor zu steuern.
|
||||
Dies ist auch ein guter Punkt, um sich mit der Dokumentation vertraut zu machen: Besuchen wir <a class="reference external" href="https://lib.comp-air.at/lib/Motor.html#compLib.Motor.Motor.power">https://lib.comp-air.at/lib/Motor.html#compLib.Motor.Motor.power</a>. Hier werden die beiden relevanten Parameter beschrieben.</p>
|
||||
<p>Als Beispiel wollen wir den rechten Motor für fünf Sekunden auf volle Geschwindigkeit setzen:</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="c1"># motor.py</span>
|
||||
<span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
</div>
|
||||
<div class="section" id="gerade-fahren">
|
||||
<h2>Gerade fahren<a class="headerlink" href="#gerade-fahren" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<p>Um geradeaus zu fahren, müssen wir beide Motoren auf dieselbe Geschwindigkeit einstellen.
|
||||
Aber Achtung! Der rechte Motor muss umgedreht werden! Das liegt daran, dass einer nach rechts und einer nach links zeigt, sie sind also technisch gesehen gespiegelt.
|
||||
Wenn wir nun diesen Code ausführen, wird der Roboter 5 Sekunden lang vorwärts fahren:</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="c1"># motor.py</span>
|
||||
<span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p><strong>Erläuterung</strong></p>
|
||||
<div class="line-block">
|
||||
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">2</span></code> wird das python-Paket <code class="docutils literal notranslate"><span class="pre">time</span></code> importiert. Wir brauchen es später, um auf die Fahrt des Roboters zu warten. Z.B.: <code class="docutils literal notranslate"><span class="pre">time.sleep(5)</span></code></div>
|
||||
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">3</span></code> importieren wir die notwendigen Funktionen aus dem <code class="docutils literal notranslate"><span class="pre">Motor</span></code>-Modul der compLib.</div>
|
||||
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">5</span></code> stellen wir den <code class="docutils literal notranslate"><span class="pre">rechten</span></code> Motor so ein, dass er vorwärts fährt. Da der Motor rückwärts eingebaut ist, müssen wir den Wert auf <code class="docutils literal notranslate"><span class="pre">-100</span></code> setzen.</div>
|
||||
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">6</span></code> stellen wir den <code class="docutils literal notranslate"><span class="pre">linken</span></code> Motor auf Vorwärtsfahrt ein. Hier können wir den Wert <code class="docutils literal notranslate"><span class="pre">100</span></code> verwenden, da der Motor in der richtigen Richtung eingebaut ist.</div>
|
||||
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">7</span></code> müssen wir warten, bis der Roboter die Fahrbefehle tatsächlich ausführt. In diesem Fall warten wir <code class="docutils literal notranslate"><span class="pre">5</span></code> Sekunden lang.</div>
|
||||
</div>
|
||||
<p>Danach wird das Programm beendet und der Roboter bleibt stehen.</p>
|
||||
<div class="section" id="mehr-fahren">
|
||||
<h3>Mehr fahren<a class="headerlink" href="#mehr-fahren" title="Link zu dieser Überschrift">¶</a></h3>
|
||||
<p>Jetzt ist es Zeit für einige komplexere Bewegungen. Um unseren Code modular und leicht lesbar zu halten, werden wir jede Aktion in eine eigene Funktion packen.</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">4</span></code> definieren wir die Funktion <code class="docutils literal notranslate"><span class="pre">driveForward()</span></code>, die den Roboter mit voller Geschwindigkeit zwei Sekunden vorwärts bewegt.</p>
|
||||
<p>Jetzt werden wir eine Funktion für das Rückwärtsfahren definieren:</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveBackward</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">9</span></code> haben wir die Funktion <code class="docutils literal notranslate"><span class="pre">driveBackward()</span></code> definiert, die den Roboter zwei Sekunden lang rückwärts fahren lässt.</p>
|
||||
<p>Jetzt können wir diese beiden Funktionen aufrufen und vorwärts und dann wieder rückwärts fahren:</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveBackward</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
|
||||
<span class="n">driveForward</span><span class="p">()</span>
|
||||
<span class="n">driveBackward</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>Wenn wir diesen Code ausführen, sollte der Roboter zunächst zwei Sekunden vorwärts und dann wieder zwei Sekunden rückwärts fahren und ungefähr an der gleichen Position wie beim Start anhalten.</p>
|
||||
<p>Zwischen den Zeilen <code class="docutils literal notranslate"><span class="pre">14</span></code> und <code class="docutils literal notranslate"><span class="pre">15</span></code> brauchen wir kein <code class="docutils literal notranslate"><span class="pre">time.sleep(2)</span></code>, da der sleep-Befehl bereits in den Funktionen integriert ist.</p>
|
||||
<p>Jetzt wollen wir, dass der Roboter erst vorwärts fährt, dann zwei Sekunden stillsteht und dann wieder rückwärts in seine Ausgangsposition fährt.</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveBackward</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
|
||||
<span class="n">driveForward</span><span class="p">()</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
<span class="n">driveBackward</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>Wenn wir den obigen Code ausführen, bleibt der Roboter nicht zwei Sekunden lang stehen, sondern fährt nach der Funktion <code class="docutils literal notranslate"><span class="pre">driveForward()</span></code> noch zwei Sekunden lang weiter. Warum passiert das? Um das zu verstehen, müssen wir wie der Roboter denken!</p>
|
||||
<p><strong>Erläuterung</strong></p>
|
||||
<div class="line-block">
|
||||
<div class="line">1. (<code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">14</span></code>) Die Funktion Vorwärtsfahrt wird aufgerufen</div>
|
||||
<div class="line-block">
|
||||
<div class="line">(<code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">5</span></code>) Motor 1 wird auf -100 gesetzt</div>
|
||||
<div class="line">(<code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">6</span></code>) Motor 4 wird auf 100 gesetzt</div>
|
||||
<div class="line">(<code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">7</span></code>) Zwei Sekunden warten und Motor 1 mit der Geschwindigkeit -100 und Motor 4 mit der Geschwindigkeit 100 bewegen (z.B. vorwärts fahren)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line-block">
|
||||
<div class="line">2. (<code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">15</span></code>) Zwei Sekunden warten, die Motoren sind immer noch auf -100 und 100 eingestellt, also fahren wir weiter vorwärts</div>
|
||||
</div>
|
||||
<div class="line-block">
|
||||
<div class="line">3. (<code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">16</span></code>) Die Funktion Rückwärtsfahren wird aufgerufen</div>
|
||||
<div class="line-block">
|
||||
<div class="line">(<code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">5</span></code>) Motor 1 wird auf 100 gesetzt</div>
|
||||
<div class="line">(<code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">6</span></code>) Motor 4 wird auf -100 gesetzt</div>
|
||||
<div class="line">(<code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">7</span></code>) Warte zwei Sekunden und bewege Motor 1 mit der Geschwindigkeit 100 und Motor 4 mit der Geschwindigkeit -100 (z.B. Rückwärtsfahren)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line-block">
|
||||
<div class="line">4. Das Programm ist beendet, und alle Motordrehzahlen werden auf 0 gesetzt.</div>
|
||||
</div>
|
||||
<p>Wir sehen also, dass wir die Motoren nach der Vorwärts- oder Rückwärtsfunktion wieder auf Geschwindigkeit <code class="docutils literal notranslate"><span class="pre">0</span></code> setzen müssen, wenn wir den Roboter anhalten wollen. Für diesen Anwendungsfall können wir eine neue Funktion <code class="docutils literal notranslate"><span class="pre">stopMotors()</span></code> schreiben, die die Geschwindigkeit für Motor <code class="docutils literal notranslate"><span class="pre">0</span></code> und <code class="docutils literal notranslate"><span class="pre">3</span></code> auf <code class="docutils literal notranslate"><span class="pre">0</span></code> setzt:</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveBackward</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">stopMotors</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>Wenn wir nun vorwärts fahren, dann zwei Sekunden warten und dann wieder rückwärts fahren wollen, können wir die Funktionen wie folgt aufrufen:</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveBackward</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">stopMotors</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
|
||||
|
||||
<span class="n">driveForward</span><span class="p">()</span>
|
||||
<span class="n">stopMotors</span><span class="p">()</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
<span class="n">driveBackward</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>Und endlich bekommen wir die Bewegung, die wir uns wünschen.</p>
|
||||
<p><strong>More Optimizations</strong></p>
|
||||
<p>Während der Code für sehr einfache Bewegungen funktioniert, wollen wir normalerweise nicht, dass unsere Funktionen entscheiden, wie lange wir vorwärts fahren. Vielleicht müssen wir manchmal vier Sekunden vorwärts fahren, und manchmal nur eine Sekunde.</p>
|
||||
<p>Nehmen wir an, wir wollen vier Sekunden vorwärts fahren. Wir wissen, dass <code class="docutils literal notranslate"><span class="pre">driveForward()</span></code> den Roboter zwei Sekunden vorwärts bewegen wird. Also können wir die Funktion einfach zwei Mal aufrufen!</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
|
||||
<span class="n">driveForward</span><span class="p">()</span>
|
||||
<span class="n">driveForward</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>Was aber, wenn wir uns nur eine Sekunde vorwärts bewegen wollen? Oder vielleicht drei Sekunden? Mit der Funktion <code class="docutils literal notranslate"><span class="pre">driveForward()</span></code> können wir das im Moment nicht machen.</p>
|
||||
<p>Stattdessen werden wir die Funktion so umschreiben, dass sie einen Parameter akzeptiert, der die Zeit angibt.</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">(</span><span class="n">seconds</span><span class="p">):</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">seconds</span><span class="p">)</span>
|
||||
|
||||
<span class="n">driveForward</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>Und mit dieser neuen Funktion können wir drei Sekunden lang vorwärts fahren.
|
||||
Wie funktioniert das nun?</p>
|
||||
<p>In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">4</span></code> definieren wir die Funktion <code class="docutils literal notranslate"><span class="pre">driveForward</span></code> und sagen, dass sie einen Parameter <code class="docutils literal notranslate"><span class="pre">seconds</span></code> benötigt. Dieser Parameter ist im Grunde eine Variable, die wir uns zum Zeitpunkt der Definition wie einen Platzhalter vorstellen können. Wenn wir die Funktion definieren, wissen wir noch nicht, welchen Wert <code class="docutils literal notranslate"><span class="pre">seconds</span></code> haben wird.</p>
|
||||
<p>Später in <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">9</span></code>, wenn wir die Funktion aufrufen, übergeben wir den Wert <code class="docutils literal notranslate"><span class="pre">3</span></code> an die Funktion und unser Platzhalter <code class="docutils literal notranslate"><span class="pre">seconds</span></code> wird den Wert <code class="docutils literal notranslate"><span class="pre">3</span></code> haben. Der Roboter wird also drei Sekunden vorwärts fahren.</p>
|
||||
<p>Vielleicht wollen wir auch, dass der Roboter mit verschiedenen Geschwindigkeiten fahren kann. Wir können also einen weiteren Parameter mit dem Namen <code class="docutils literal notranslate"><span class="pre">speed</span></code> anlegen. Dann werden wir ein Programm schreiben, das den Roboter drei Sekunden mit voller Geschwindigkeit und dann fünf Sekunden mit halber Geschwindigkeit fahren lässt.</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">(</span><span class="n">seconds</span><span class="p">,</span> <span class="n">speed</span><span class="p">):</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="n">speed</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="n">speed</span><span class="p">)</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">seconds</span><span class="p">)</span>
|
||||
|
||||
<span class="n">driveForward</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">driveForward</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">50</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">9</span></code> wird der Platzhalter <code class="docutils literal notranslate"><span class="pre">seconds</span></code> auf <code class="docutils literal notranslate"><span class="pre">3</span></code> und die <code class="docutils literal notranslate"><span class="pre">Geschwindigkeit</span></code> auf <code class="docutils literal notranslate"><span class="pre">100</span></code> gesetzt.
|
||||
In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">10</span></code> wird der Platzhalter <code class="docutils literal notranslate"><span class="pre">seconds</span></code> auf <code class="docutils literal notranslate"><span class="pre">5</span></code> und die <code class="docutils literal notranslate"><span class="pre">Geschwindigkeit</span></code> auf <code class="docutils literal notranslate"><span class="pre">50</span></code> gesetzt.</p>
|
||||
<p><strong>Bewährte Praktiken</strong>
|
||||
Nun werden wir uns einige weitere Optimierungen und bewährte Verfahren ansehen.</p>
|
||||
<p><strong>1. Wir sollten den Schlafbefehl nicht in die Fahrfunktion einbauen.</strong></p>
|
||||
<p>Wir haben das bis jetzt getan, um ein Gefühl dafür zu bekommen, wie Funktionen funktionieren, und der Einfachheit halber. Später, wenn Sie anfangen, komplexere Programme zu schreiben, sollten Sie dies vermeiden.</p>
|
||||
<p>Das Beispiel von oben, in dem wir vorwärts und rückwärts gefahren sind und zwei Sekunden gewartet haben, sollte also wie folgt aussehen:</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveForward</span><span class="p">(</span><span class="n">speed</span><span class="p">):</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="n">speed</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="n">speed</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">driveBackward</span><span class="p">(</span><span class="n">speed</span><span class="p">):</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">speed</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="n">speed</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">stopMotors</span><span class="p">():</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
|
||||
|
||||
<span class="n">driveForward</span><span class="p">(</span><span class="mi">100</span><span class="p">)</span> <span class="c1"># Set the motors to forward</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="c1"># Let the robot drive for 2 seconds</span>
|
||||
<span class="n">stopMotors</span><span class="p">()</span> <span class="c1"># Now stop the robot</span>
|
||||
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="c1"># Wait another 2 seconds, robot is not moving</span>
|
||||
|
||||
<span class="n">driveBackward</span><span class="p">(</span><span class="mi">100</span><span class="p">)</span> <span class="c1"># Now set the motors to a backwards speed</span>
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="c1"># Let the robot continue driving for 2 seconds</span>
|
||||
<span class="n">stopMotors</span><span class="p">()</span> <span class="c1"># And finally stop it again</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p><strong>Warum ist das so wichtig?</strong></p>
|
||||
<p>Normalerweise schlafen wir nicht sehr viel und führen in dieser Zeit andere Verarbeitungen durch. Zum Beispiel könnten wir ein Bild von der Kamera verarbeiten oder die IR-Sensoren auslesen. Wenn wir also eine Funktion wie <code class="docutils literal notranslate"><span class="pre">driveForward()</span></code> aufrufen, können wir davon ausgehen, dass sie im Hintergrund abläuft und wir andere Aufgaben erledigen, während sich der Roboter bewegt, anstatt nur darauf zu warten, dass er fertig wird.</p>
|
||||
<p><strong>2. Fahren Sie nicht zu langsam.</strong></p>
|
||||
<p>Wenn du die Fahrgeschwindigkeit auf eine sehr kleine Zahl einstellst, kann es sein, dass sich der Roboter gar nicht mehr bewegt, weil die Motoren eine bestimmte Menge an Energie benötigen, um den Roboter überhaupt zu bewegen.</p>
|
||||
<p><strong>3. Fahren Sie nicht zu schnell.</strong></p>
|
||||
<p>Wenn du die Fahrgeschwindigkeit auf eine sehr hohe Zahl einstellst (z. B. <code class="docutils literal notranslate"><span class="pre">100</span></code>), könnte dein Roboter zu schnell für seine Sensoren sein. Dies wird später wichtig sein, wenn wir versuchen, eine schwarze Linie zu erkennen, aber zu schnell über sie fahren.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="thridProgram.html" class="btn btn-neutral float-right" title="Mein drittes Programm" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="firstProgram.html" class="btn btn-neutral float-left" title="Mein erstes Programm" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
290
gettingStarted/thridProgram.html
Normal file
|
@ -0,0 +1,290 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Mein drittes Programm — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
|
||||
<link rel="search" title="Suche" href="../search.html" />
|
||||
<link rel="next" title="Installationsanweisungen" href="../software/installation.html" />
|
||||
<link rel="prev" title="Mein zweites Programm" href="secondProgram.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="codeServer.html">Programmierumgebung</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="firstProgram.html">Mein erstes Programm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="secondProgram.html">Mein zweites Programm</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">Mein drittes Programm</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">CompLib</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li><a href="index.html">Erste Schritte</a> »</li>
|
||||
|
||||
<li>Mein drittes Programm</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/gettingStarted/thridProgram.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="mein-drittes-programm">
|
||||
<h1>Mein drittes Programm<a class="headerlink" href="#mein-drittes-programm" title="Link zu dieser Überschrift">¶</a></h1>
|
||||
<p>Der offizielle compAIR-Bot ist mit einer Reihe von Sensoren ausgestattet. Die wichtigsten sind die Infrarotsensoren und -sender, die an der Vorderseite des Roboters angebracht sind. Insgesamt gibt es fünf IR-Sensoren.</p>
|
||||
<p>Um loszulegen, muss man zunächst das entsprechende Modul wie folgt importieren:</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.IRSensor</span> <span class="kn">import</span> <span class="n">IRSensor</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p><img alt="irSensor" src="../_images/07_irSensor.webp" /></p>
|
||||
<p>Wie im obigen Diagramm zu sehen ist, verfügt jeder Sensor auch über einen entsprechenden IR-Sender / Emitter. Dieser Sender kann mit <code class="docutils literal notranslate"><span class="pre">IRSensor.set(port,</span> <span class="pre">enable)</span></code> aktiviert werden.</p>
|
||||
<p>Schalten wir nun alle fünf Sender ein:</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.IRSensor</span> <span class="kn">import</span> <span class="n">IRSensor</span>
|
||||
|
||||
<span class="n">IRSensor</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>Diese fünf verschiedenen Sensoren befinden sich an der Vorderseite des Roboters und sind wichtig, um schwarze Linien zu erkennen.</p>
|
||||
<p>Es ist sehr einfach, den Wert der Sensoren abzulesen:</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.IRSensor</span> <span class="kn">import</span> <span class="n">IRSensor</span>
|
||||
|
||||
<span class="n">IRSensor</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">IRSensor</span><span class="o">.</span><span class="n">read_all</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span> <span class="o">></span> <span class="mi">500</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"high"</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"low"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p><strong>Erkennen einer schwarzen Linie</strong>
|
||||
Um den IR-Sensor zu testen, kannst du deinen Roboter auf eine schwarze Linie stellen. Der Sensor in der Mitte sollte auf der schwarzen Linie liegen.</p>
|
||||
<div class="highlight-python notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.IRSensor</span> <span class="kn">import</span> <span class="n">IRSensor</span>
|
||||
|
||||
<span class="n">IRSensor</span><span class="o">.</span><span class="n">enable</span><span class="p">()</span>
|
||||
<span class="n">COLOR_BREAK</span> <span class="o">=</span> <span class="mi">900</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">IRSensor</span><span class="o">.</span><span class="n">read_all</span><span class="p">()[</span><span class="mi">2</span><span class="p">]</span> <span class="o">></span> <span class="n">COLOR_BREAK</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Robot is standing on a black line"</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Robot is NOT standing on a black line"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</td></tr></table></div>
|
||||
<p>Wenn das Programm ausgeführt wird, zeigt es an, dass der Roboter auf einer schwarzen Linie steht, wenn sich der mittlere IR-Sensor des Roboters über einer schwarzen Linie befindet, und es zeigt an, dass der Roboter NICHT auf einer schwarzen Linie steht, wenn sich der mittlere IR-Sensor nicht über einer Linie befindet.</p>
|
||||
<div class="line-block">
|
||||
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">1</span></code> importieren wir das <code class="docutils literal notranslate"><span class="pre">IRSensor</span></code>-Modul, das zur Kommunikation mit dem IR-Sensor-Board verwendet werden kann.</div>
|
||||
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">3</span></code> wird der Sensor mit der Nummer <code class="docutils literal notranslate"><span class="pre">3</span></code> aktiviert. Wenn wir einen Sensor nicht aktivieren, können wir ihn nicht in unserem Programm verwenden.</div>
|
||||
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">4</span></code> stellen wir einen Farbschwellenwert von <code class="docutils literal notranslate"><span class="pre">900</span></code> ein, mit dem wir später prüfen werden, ob der Sensorwert unter oder über diesem Schwellenwert liegt. Unterhalb bedeutet, dass sich eine helle Farbe unter dem IR-Sensor befindet und ein höherer Wert als <code class="docutils literal notranslate"><span class="pre">900</span></code> bedeutet, dass sich eine dunkle Farbe unter dem IR-Sensor befindet.</div>
|
||||
</div>
|
||||
<div class="line-block">
|
||||
<div class="line">In <code class="docutils literal notranslate"><span class="pre">Zeile</span> <span class="pre">6</span></code> lesen wir den Sensor Nummer <code class="docutils literal notranslate"><span class="pre">2</span></code> aus und prüfen, ob der Wert über dem von uns definierten Schwellenwert von <code class="docutils literal notranslate"><span class="pre">900</span></code> liegt. Wenn das der Fall ist, hat der IR-Sensor eine schwarze Linie erkannt.</div>
|
||||
</div>
|
||||
<p>Wir werden nun das Programm so ändern, dass es alle <code class="docutils literal notranslate"><span class="pre">0.1</span></code> Sekunden prüft, ob sich eine schwarze Linie unter dem Roboter befindet, und wenn dies der Fall ist, eine Meldung ausgibt.</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="../software/installation.html" class="btn btn-neutral float-right" title="Installationsanweisungen" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="secondProgram.html" class="btn btn-neutral float-left" title="Mein zweites Programm" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
303
gettingStarted/wifi.html
Normal file
|
@ -0,0 +1,303 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>WLAN-Verbindung herstellen — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
|
||||
<link rel="search" title="Suche" href="../search.html" />
|
||||
<link rel="next" title="Programmierumgebung" href="codeServer.html" />
|
||||
<link rel="prev" title="Erste Schritte" href="index.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">WLAN-Verbindung herstellen</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#schritt-fur-schritt-macos">Schritt für Schritt - macOS</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#weitere-informationen">Weitere Informationen</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#fehlerbehandlung">Fehlerbehandlung</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="codeServer.html">Programmierumgebung</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="firstProgram.html">Mein erstes Programm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="secondProgram.html">Mein zweites Programm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="thridProgram.html">Mein drittes Programm</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">CompLib</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li><a href="index.html">Erste Schritte</a> »</li>
|
||||
|
||||
<li>WLAN-Verbindung herstellen</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/gettingStarted/wifi.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="wlan-verbindung-herstellen">
|
||||
<span id="gettingstarted-wifi"></span><h1>WLAN-Verbindung herstellen<a class="headerlink" href="#wlan-verbindung-herstellen" title="Link zu dieser Überschrift">¶</a></h1>
|
||||
<div class="section" id="schritt-fur-schritt-macos">
|
||||
<h2>Schritt für Schritt - macOS<a class="headerlink" href="#schritt-fur-schritt-macos" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<ol class="arabic">
|
||||
<li><p>SD-Karte aus dem Raspberry Pi bzw. Roboter entnehmen.</p></li>
|
||||
<li><p>Einstecken der SD-Karte in den Computer</p></li>
|
||||
<li><p>Öffnen der SD-Karte mit dem Namen „boot“ <img alt="bootImage" src="../_images/01_boot.png" /></p></li>
|
||||
<li><p>Generieren des PSK auf <a class="reference external" href="https://www.wireshark.org/tools/wpa-psk.html">https://www.wireshark.org/tools/wpa-psk.html</a> <img alt="pskImage" src="../_images/02_psk.png" /></p></li>
|
||||
<li><p>Öffnen der Datei „wpa_supplicant.conf“ auf der SD-Karte</p></li>
|
||||
<li><p>Einfügen der Konfiguration. Dabei muss die SSID und der vorher generierte PSK eingesetzt werden</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ctrl_interface</span><span class="o">=</span><span class="n">DIR</span><span class="o">=/</span><span class="n">var</span><span class="o">/</span><span class="n">run</span><span class="o">/</span><span class="n">wpa_supplicant</span> <span class="n">GROUP</span><span class="o">=</span><span class="n">netdev</span>
|
||||
<span class="n">update_config</span><span class="o">=</span><span class="mi">1</span>
|
||||
<span class="n">country</span><span class="o">=</span><span class="n">AT</span>
|
||||
|
||||
<span class="n">network</span><span class="o">=</span><span class="p">{</span>
|
||||
<span class="n">ssid</span><span class="o">=</span><span class="s2">"EinTollerNameFürDasWlan"</span>
|
||||
<span class="n">psk</span><span class="o">=</span><span class="s2">"98117b165a48f25cbe36f288ddf597729a40feeea93054c19bfa8e5eab238541"</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
<li><p>Speichern, Auswerfen und wieder in den Raspberry Pi einbauen</p></li>
|
||||
<li><p>Starten des Roboters</p></li>
|
||||
<li><p>Die IP-Adresse sollte nun am Roboter angezeigt werden</p></li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="weitere-informationen">
|
||||
<h2>Weitere Informationen<a class="headerlink" href="#weitere-informationen" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<p>Die „wpa_supplicant.conf“ Datei wird beim Start des Rpasberry Pi automatisch an den richtigen Ort kopiert, damit sich der Roboter zum Wlan verbindet.
|
||||
Eine genauere Anleitung wird vom Hersteller des Raspberry Pi <a class="reference external" href="https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-networking-2">hier</a> bereitgestellt.</p>
|
||||
</div>
|
||||
<div class="section" id="fehlerbehandlung">
|
||||
<h2>Fehlerbehandlung<a class="headerlink" href="#fehlerbehandlung" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<p>Sollte es dazu kommen, dass der Roboter nicht automatisch die Verbindung mit dem Netzwerk herstellt, kann eine Kabelgebundene Verbindung zur Diagnose von Fehlern genutzt werden.
|
||||
Dabei wird automatisch die IP-Adresse der Verbindung „eth“ am Roboter angezeigt. Nach der erfolgreichen Verbindung zum Roboter mittels SSH kann die „wpa_cli“ zur Fehlerbehandlung verwendet werden:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">></span> <span class="n">wpa_cli</span>
|
||||
<span class="n">wpa_cli</span> <span class="n">v2</span><span class="o">.</span><span class="mi">9</span>
|
||||
<span class="n">Copyright</span> <span class="p">(</span><span class="n">c</span><span class="p">)</span> <span class="mi">2004</span><span class="o">-</span><span class="mi">2019</span><span class="p">,</span> <span class="n">Jouni</span> <span class="n">Malinen</span> <span class="o"><</span><span class="n">j</span><span class="nd">@w1</span><span class="o">.</span><span class="n">fi</span><span class="o">></span> <span class="ow">and</span> <span class="n">contributors</span>
|
||||
|
||||
<span class="n">This</span> <span class="n">software</span> <span class="n">may</span> <span class="n">be</span> <span class="n">distributed</span> <span class="n">under</span> <span class="n">the</span> <span class="n">terms</span> <span class="n">of</span> <span class="n">the</span> <span class="n">BSD</span> <span class="n">license</span><span class="o">.</span>
|
||||
<span class="n">See</span> <span class="n">README</span> <span class="k">for</span> <span class="n">more</span> <span class="n">details</span><span class="o">.</span>
|
||||
|
||||
|
||||
<span class="n">Selected</span> <span class="n">interface</span> <span class="s1">'p2p-dev-wlan0'</span>
|
||||
|
||||
<span class="n">Interactive</span> <span class="n">mode</span>
|
||||
|
||||
<span class="o">></span> <span class="n">interface</span> <span class="n">wlan0</span>
|
||||
<span class="n">Connected</span> <span class="n">to</span> <span class="n">interface</span> <span class="s1">'wlan0.</span>
|
||||
<span class="o">></span> <span class="n">scan</span>
|
||||
<span class="n">OK</span>
|
||||
<span class="o"><</span><span class="mi">3</span><span class="o">></span><span class="n">CTRL</span><span class="o">-</span><span class="n">EVENT</span><span class="o">-</span><span class="n">SCAN</span><span class="o">-</span><span class="n">STARTED</span>
|
||||
<span class="o"><</span><span class="mi">3</span><span class="o">></span><span class="n">CTRL</span><span class="o">-</span><span class="n">EVENT</span><span class="o">-</span><span class="n">SCAN</span><span class="o">-</span><span class="n">RESULTS</span>
|
||||
<span class="o">></span> <span class="n">scan_result</span>
|
||||
<span class="n">bssid</span> <span class="o">/</span> <span class="n">frequency</span> <span class="o">/</span> <span class="n">signal</span> <span class="n">level</span> <span class="o">/</span> <span class="n">flags</span> <span class="o">/</span> <span class="n">ssid</span>
|
||||
<span class="mi">68</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="n">b8</span><span class="p">:</span><span class="mi">0</span><span class="n">c</span><span class="p">:</span><span class="n">d7</span><span class="p">:</span><span class="mi">47</span> <span class="mi">2462</span> <span class="o">-</span><span class="mi">66</span> <span class="p">[</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">WG</span>
|
||||
<span class="mi">68</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="n">b8</span><span class="p">:</span><span class="mi">0</span><span class="n">c</span><span class="p">:</span><span class="n">d7</span><span class="p">:</span><span class="mi">40</span> <span class="mi">5220</span> <span class="o">-</span><span class="mi">63</span> <span class="p">[</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">WG</span>
|
||||
<span class="mi">34</span><span class="p">:</span><span class="mi">2</span><span class="n">c</span><span class="p">:</span><span class="n">c4</span><span class="p">:</span><span class="n">da</span><span class="p">:</span><span class="n">dd</span><span class="p">:</span><span class="n">b9</span> <span class="mi">5200</span> <span class="o">-</span><span class="mi">65</span> <span class="p">[</span><span class="n">WPA</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">TKIP</span><span class="p">][</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">WPS</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">WLAN10573403</span>
|
||||
<span class="mi">98</span><span class="p">:</span><span class="n">da</span><span class="p">:</span><span class="n">c4</span><span class="p">:</span><span class="n">e5</span><span class="p">:</span><span class="mi">21</span><span class="p">:</span><span class="n">d0</span> <span class="mi">2437</span> <span class="o">-</span><span class="mi">57</span> <span class="p">[</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">WG</span>
|
||||
<span class="mi">34</span><span class="p">:</span><span class="mi">2</span><span class="n">c</span><span class="p">:</span><span class="n">c4</span><span class="p">:</span><span class="n">da</span><span class="p">:</span><span class="n">dd</span><span class="p">:</span><span class="n">c6</span> <span class="mi">2412</span> <span class="o">-</span><span class="mi">52</span> <span class="p">[</span><span class="n">WPA</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="p">][</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="o">+</span><span class="n">TKIP</span><span class="p">][</span><span class="n">WPS</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">WLAN10573403</span>
|
||||
<span class="mi">20</span><span class="p">:</span><span class="mi">83</span><span class="p">:</span><span class="n">f8</span><span class="p">:</span><span class="mi">07</span><span class="p">:</span><span class="mi">5</span><span class="n">b</span><span class="p">:</span><span class="mi">90</span> <span class="mi">2467</span> <span class="o">-</span><span class="mi">67</span> <span class="p">[</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">WPS</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">A1</span><span class="o">-</span><span class="mi">075</span><span class="n">b8c</span>
|
||||
<span class="mi">7</span><span class="n">c</span><span class="p">:</span><span class="mi">39</span><span class="p">:</span><span class="mi">53</span><span class="p">:</span><span class="mi">94</span><span class="p">:</span><span class="mi">49</span><span class="p">:</span><span class="mi">82</span> <span class="mi">5280</span> <span class="o">-</span><span class="mi">77</span> <span class="p">[</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">WPS</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">A1</span><span class="o">-</span><span class="mi">944980</span><span class="o">-</span><span class="mi">5</span><span class="n">G</span>
|
||||
<span class="mi">7</span><span class="n">c</span><span class="p">:</span><span class="mi">39</span><span class="p">:</span><span class="mi">53</span><span class="p">:</span><span class="mi">94</span><span class="p">:</span><span class="mi">49</span><span class="p">:</span><span class="mi">81</span> <span class="mi">2427</span> <span class="o">-</span><span class="mi">68</span> <span class="p">[</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">WPS</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">A1</span><span class="o">-</span><span class="mi">944980</span>
|
||||
<span class="mi">90</span><span class="p">:</span><span class="n">fd</span><span class="p">:</span><span class="mi">73</span><span class="p">:</span><span class="n">ac</span><span class="p">:</span><span class="n">d3</span><span class="p">:</span><span class="mi">27</span> <span class="mi">2452</span> <span class="o">-</span><span class="mi">72</span> <span class="p">[</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">WPS</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">Drei_H288A_24G_eKy5</span>
|
||||
<span class="mi">50</span><span class="p">:</span><span class="n">e0</span><span class="p">:</span><span class="mi">39</span><span class="p">:</span><span class="mi">3</span><span class="n">c</span><span class="p">:</span><span class="n">e5</span><span class="p">:</span><span class="mi">80</span> <span class="mi">5180</span> <span class="o">-</span><span class="mi">82</span> <span class="p">[</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">WPS</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">A1</span><span class="o">-</span><span class="mi">393</span><span class="n">CE57F</span>
|
||||
<span class="mi">90</span><span class="p">:</span><span class="n">fd</span><span class="p">:</span><span class="mi">73</span><span class="p">:</span><span class="n">ac</span><span class="p">:</span><span class="n">d3</span><span class="p">:</span><span class="mi">28</span> <span class="mi">5500</span> <span class="o">-</span><span class="mi">83</span> <span class="p">[</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">WPS</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">Drei_H288A_5G_eKy5</span>
|
||||
<span class="mi">68</span><span class="p">:</span><span class="mi">02</span><span class="p">:</span><span class="n">b8</span><span class="p">:</span><span class="mi">41</span><span class="p">:</span><span class="mi">42</span><span class="p">:</span><span class="n">f9</span> <span class="mi">5180</span> <span class="o">-</span><span class="mi">84</span> <span class="p">[</span><span class="n">WPA</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">TKIP</span><span class="p">][</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">WPS</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">WLAN18792472</span>
|
||||
<span class="mi">34</span><span class="p">:</span><span class="mi">2</span><span class="n">c</span><span class="p">:</span><span class="n">c4</span><span class="p">:</span><span class="mi">30</span><span class="p">:</span><span class="mi">3</span><span class="n">c</span><span class="p">:</span><span class="mi">65</span> <span class="mi">5180</span> <span class="o">-</span><span class="mi">89</span> <span class="p">[</span><span class="n">WPA</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">TKIP</span><span class="p">][</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">WPS</span><span class="p">][</span><span class="n">ESS</span><span class="p">]</span> <span class="n">witt</span>
|
||||
<span class="n">fa</span><span class="p">:</span><span class="mi">0</span><span class="n">d</span><span class="p">:</span><span class="n">ac</span><span class="p">:</span><span class="n">d3</span><span class="p">:</span><span class="mi">40</span><span class="p">:</span><span class="n">d4</span> <span class="mi">2467</span> <span class="o">-</span><span class="mi">80</span> <span class="p">[</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">WPS</span><span class="p">][</span><span class="n">ESS</span><span class="p">][</span><span class="n">P2P</span><span class="p">]</span> <span class="n">DIRECT</span><span class="o">-</span><span class="n">d4</span><span class="o">-</span><span class="n">HP</span> <span class="n">M28</span> <span class="n">LaserJet</span>
|
||||
<span class="mi">0</span><span class="n">e</span><span class="p">:</span><span class="mi">84</span><span class="p">:</span><span class="n">dc</span><span class="p">:</span><span class="mi">14</span><span class="p">:</span><span class="n">ac</span><span class="p">:</span><span class="mi">27</span> <span class="mi">2467</span> <span class="o">-</span><span class="mi">85</span> <span class="p">[</span><span class="n">WPA2</span><span class="o">-</span><span class="n">PSK</span><span class="o">-</span><span class="n">CCMP</span><span class="p">][</span><span class="n">WPS</span><span class="p">][</span><span class="n">ESS</span><span class="p">][</span><span class="n">P2P</span><span class="p">]</span> <span class="n">DIRECT</span><span class="o">-</span><span class="n">wo</span><span class="o">-</span><span class="n">BRAVIA</span>
|
||||
<span class="o">></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="codeServer.html" class="btn btn-neutral float-right" title="Programmierumgebung" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="index.html" class="btn btn-neutral float-left" title="Erste Schritte" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
146
index.html
|
@ -1,13 +1,13 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Competition Robot Library — CompLib 0.2.3 documentation</title>
|
||||
<title>Dokumentation des Roboters — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
|
@ -29,13 +29,14 @@
|
|||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Usage" href="other/usage.html" />
|
||||
<link rel="index" title="Stichwortverzeichnis" href="genindex.html" />
|
||||
<link rel="search" title="Suche" href="search.html" />
|
||||
<link rel="next" title="Erste Schritte" href="gettingStarted/index.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -63,7 +64,7 @@
|
|||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
@ -80,22 +81,12 @@
|
|||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Competition Robot Library</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Usage</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Api.html">Api</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Aruco.html">Aruco</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Display.html">Display</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Encoder.html">Encoder</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Linefollower.html">Linefollower Examples</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Logging.html">Logging</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Odom.html">Odometry</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/QC.html">Quality Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Robot.html">Robot</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Vision.html">Vision</a></li>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="gettingStarted/index.html">Erste Schritte</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -142,13 +133,13 @@
|
|||
|
||||
<li><a href="#" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Competition Robot Library</li>
|
||||
<li>Dokumentation des Roboters</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="_sources/index.rst.txt" rel="nofollow"> View page source</a>
|
||||
<a href="_sources/index.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
@ -161,102 +152,19 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<img alt="_images/compair-logo-white.svg" src="_images/compair-logo-white.svg" /><div class="section" id="competition-robot-library">
|
||||
<h1>Competition Robot Library<a class="headerlink" href="#competition-robot-library" title="Permalink to this headline">¶</a></h1>
|
||||
<img alt="_images/compair-logo-white.svg" src="_images/compair-logo-white.svg" /><div class="section" id="dokumentation-des-roboters">
|
||||
<h1>Dokumentation des Roboters<a class="headerlink" href="#dokumentation-des-roboters" title="Link zu dieser Überschrift">¶</a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
</div>
|
||||
<div class="section" id="contents">
|
||||
<h2>Contents<a class="headerlink" href="#contents" title="Permalink to this headline">¶</a></h2>
|
||||
<h2>Contents<a class="headerlink" href="#contents" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Competition Robot Library</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Usage</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Api.html">Api</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Api.html#seeding">Seeding</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Api.html#double-elimination">Double Elimination</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Api.html#position">Position</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Api.html#examples">Examples</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="lib/Api.html#calling-seeding-api">Calling Seeding API</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="lib/Api.html#calling-double-elimination-api">Calling Double Elimination API</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Aruco.html">Aruco</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Aruco.html#examples">Examples</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="lib/Aruco.html#recognizing-aruco-tags">Recognizing ArUco tags</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Display.html">Display</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Display.html#class-documentation">Class Documentation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Display.html#examples">Examples</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="lib/Display.html#write-a-line-to-the-display">Write a line to the display</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Encoder.html">Encoder</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Encoder.html#class-documentation">Class Documentation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/IRSensor.html">Infrared Sensor</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/IRSensor.html#examples">Examples</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="lib/IRSensor.html#testing-analog-sensors">Testing analog sensors</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Linefollower.html">Linefollower Examples</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Linefollower.html#simple-linefollower">Simple Linefollower</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Logging.html">Logging</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Logging.html#class-documentation">Class Documentation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Logging.html#examples">Examples</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="lib/Logging.html#turn-up-the-logging">Turn up the logging</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Motor.html">Motor</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Motor.html#class-documentation">Class Documentation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Motor.html#examples">Examples</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="lib/Motor.html#driving-straight-maybe">Driving straight (maybe)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Odom.html">Odometry</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Odom.html#class-documentation">Class Documentation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Odom.html#examples">Examples</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="lib/Odom.html#getting-actual-distance-driven">Getting actual distance driven</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/QC.html">Quality Control</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/QC.html#infrared-test">Infrared Test</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/QC.html#motor-test">Motor Test</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/QC.html#servo-test">Servo Test</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/QC.html#vision-test">Vision Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Robot.html">Robot</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Robot.html#class-documentation">Class Documentation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Vision.html">Vision</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Vision.html#opencv-stream">Opencv Stream</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="lib/Vision.html#examples">Examples</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="lib/Vision.html#using-the-vision-module">Using the Vision Module</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="lib/Vision.html#chessboard-detection">Chessboard Detection</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="gettingStarted/index.html">Erste Schritte</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -270,7 +178,7 @@
|
|||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="other/usage.html" class="btn btn-neutral float-right" title="Usage" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
<a href="gettingStarted/index.html" class="btn btn-neutral float-right" title="Erste Schritte" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
</div>
|
||||
|
@ -288,11 +196,11 @@
|
|||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
|
|
368
lib/classes/Motor.html
Normal file
|
@ -0,0 +1,368 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Motoren — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Stichwortverzeichnis" href="../../genindex.html" />
|
||||
<link rel="search" title="Suche" href="../../search.html" />
|
||||
<link rel="prev" title="compLib" href="../index.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="../../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../gettingStarted/index.html">Erste Schritte</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">compLib</a><ul class="current">
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">Motoren</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#dokumentation-der-klasse">Dokumentation der Klasse</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#genauere-informationen">Genauere Informationen</a><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#power-vs-speed-vs-pulsewidth">Power vs Speed vs PulseWidth</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#normal-vs-multiple">Normal vs Multiple</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#beispiele">Beispiele</a><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#vorwarts-fahren">Vorwärts fahren</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../../index.html">CompLib</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li><a href="../index.html">compLib</a> »</li>
|
||||
|
||||
<li>Motoren</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../../_sources/lib/classes/Motor.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="motoren">
|
||||
<span id="lib-motor"></span><h1>Motoren<a class="headerlink" href="#motoren" title="Link zu dieser Überschrift">¶</a></h1>
|
||||
<div class="section" id="dokumentation-der-klasse">
|
||||
<h2>Dokumentation der Klasse<a class="headerlink" href="#dokumentation-der-klasse" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<dl class="py class">
|
||||
<dt id="compLib.Motor.Motor">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">compLib.Motor.</code><code class="sig-name descname">Motor</code><a class="headerlink" href="#compLib.Motor.Motor" title="Link zu dieser Definition">¶</a></dt>
|
||||
<dd><p>Klasse zum Ansteuern der Motoren</p>
|
||||
<dl class="py method">
|
||||
<dt id="compLib.Motor.Motor.multiple_power">
|
||||
<em class="property">static </em><code class="sig-name descname">multiple_power</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">arguments</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.multiple_power" title="Link zu dieser Definition">¶</a></dt>
|
||||
<dd><p>Mehrere Motoren auf eine prozentuale Leistung der Höchstgeschwindigkeit einstellen</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameter</dt>
|
||||
<dd class="field-odd"><p><strong>arguments</strong> – tuple von port, percentage</p>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="compLib.Motor.Motor.multiple_pulse_width">
|
||||
<em class="property">static </em><code class="sig-name descname">multiple_pulse_width</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">arguments</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.multiple_pulse_width" title="Link zu dieser Definition">¶</a></dt>
|
||||
<dd><p>Setzen den Pulsbreite mehreer Motoren in Prozent der Periode</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameter</dt>
|
||||
<dd class="field-odd"><p><strong>arguments</strong> – tuple von port, prozent</p>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="compLib.Motor.Motor.multiple_speed">
|
||||
<em class="property">static </em><code class="sig-name descname">multiple_speed</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">arguments</span><span class="p">:</span> <span class="n">tuple</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.multiple_speed" title="Link zu dieser Definition">¶</a></dt>
|
||||
<dd><p>Geschwindigkeit mehrerer Motoren einstellen</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameter</dt>
|
||||
<dd class="field-odd"><p><strong>arguments</strong> – tuple von port, Geschwindigkeit in Radianten pro Sekunde (rad/s)</p>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="compLib.Motor.Motor.power">
|
||||
<em class="property">static </em><code class="sig-name descname">power</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">port</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">percent</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.power" title="Link zu dieser Definition">¶</a></dt>
|
||||
<dd><p>Motor auf eine prozentuale Leistung der Höchstgeschwindigkeit einstellen</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameter</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>port</strong> – Port, an welchen der Motor angestecht wird. 0-3</p></li>
|
||||
<li><p><strong>percent</strong> – Prozentsatz der Höchstgeschwindigkeit. zwischen -100 und 100</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="compLib.Motor.Motor.pulse_width">
|
||||
<em class="property">static </em><code class="sig-name descname">pulse_width</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">port</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">percent</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.pulse_width" title="Link zu dieser Definition">¶</a></dt>
|
||||
<dd><p>Setzen den Pulsbreite eines Motors in Prozent der Periode</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameter</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>port</strong> – Port, an welchen der Motor angestecht wird. 0-3</p></li>
|
||||
<li><p><strong>percent</strong> – Prozent der Periode zwischen -100 und 100</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="compLib.Motor.Motor.speed">
|
||||
<em class="property">static </em><code class="sig-name descname">speed</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">port</span><span class="p">:</span> <span class="n">int</span></em>, <em class="sig-param"><span class="n">speed</span><span class="p">:</span> <span class="n">float</span></em><span class="sig-paren">)</span><a class="headerlink" href="#compLib.Motor.Motor.speed" title="Link zu dieser Definition">¶</a></dt>
|
||||
<dd><p>Geschwindigkeit des Motors einstellen</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameter</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>port</strong> – Port, an welchen der Motor angestecht wird. 0-3</p></li>
|
||||
<li><p><strong>speed</strong> – Drehzahl, mit der sich ein Motor dreht, in Radianten pro Sekunde (rad/s)</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt class="field-even">Raises</dt>
|
||||
<dd class="field-even"><p>IndexError</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<div class="section" id="genauere-informationen">
|
||||
<h2>Genauere Informationen<a class="headerlink" href="#genauere-informationen" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<div class="section" id="power-vs-speed-vs-pulsewidth">
|
||||
<h3>Power vs Speed vs PulseWidth<a class="headerlink" href="#power-vs-speed-vs-pulsewidth" title="Link zu dieser Überschrift">¶</a></h3>
|
||||
<p>Zur ansteuerung der Motoren kann entweder <code class="docutils literal notranslate"><span class="pre">Motor.power(...)</span></code>, <code class="docutils literal notranslate"><span class="pre">Motor.speed(...)</span></code> oder <code class="docutils literal notranslate"><span class="pre">Motor.pulse_width(...)`</span></code> verwendet werden.
|
||||
Der Unterschied der 3 Funktionen liegt dabei in der Einheit des 2. Parameters.</p>
|
||||
<div class="line-block">
|
||||
<div class="line">Bei <code class="docutils literal notranslate"><span class="pre">Motor.power()</span></code> wird dabei ein Wert zwischen -100% und 100% der maximalen Geschwindigkeit angegeben.</div>
|
||||
<div class="line"><code class="docutils literal notranslate"><span class="pre">Motor.speed()</span></code> verwendet die Encoder um die Geschwindigkeit der Motoren mittels closed-loop zu steuern. Diese Funktion sollte nur verwendet werden, wenn <code class="docutils literal notranslate"><span class="pre">Motor.power()</span></code> nicht zur Ansteuerung ausreicht.</div>
|
||||
<div class="line"><code class="docutils literal notranslate"><span class="pre">Motor.pulse_width()</span></code> stellt die Geschwindigkeit des Motors mittels der Pulsbreite der PWM-Steuerung des Motors ein. Diese Funktion ist so nah an der Hardware wie möglich und sollte auch nur verwendet werden, wenn es einen expliziten Grund dafür gibt.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="normal-vs-multiple">
|
||||
<h3>Normal vs Multiple<a class="headerlink" href="#normal-vs-multiple" title="Link zu dieser Überschrift">¶</a></h3>
|
||||
<p>Der Aufruf der funktionen kann entweder über <code class="docutils literal notranslate"><span class="pre">Motor.power(port,</span> <span class="pre">percent)</span></code> oder <code class="docutils literal notranslate"><span class="pre">Motor.power((port,</span> <span class="pre">percent),</span> <span class="pre">(port,</span> <span class="pre">percent),</span> <span class="pre">..)</span></code> erfolgen.
|
||||
Der zweite Aufruf ermöglicht dem Entwickler dabei beide Motoren in einem Aufruf anzusteuern und bringt einen kleinen Vorteil in der Leistungsfähigkeit der Software.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="beispiele">
|
||||
<h2>Beispiele<a class="headerlink" href="#beispiele" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<div class="section" id="vorwarts-fahren">
|
||||
<h3>Vorwärts fahren<a class="headerlink" href="#vorwarts-fahren" title="Link zu dieser Überschrift">¶</a></h3>
|
||||
<p>Mit folgenden Programm drehen sich beide Motoren mit 50% ihrer maximalen Geschwindigkeit.
|
||||
Dabei ist zu beachten, dass ein Motor in die entgegengesetzte Richtung zum aneren Motor gedreht werden muss, da diese spiegelverkehrt montiert sind.</p>
|
||||
<p>Zusätzlich ist ein <code class="docutils literal notranslate"><span class="pre">time.sleep(5)</span></code> notwendig, welches das Programm für 5 Sekunden pausiert. Diese Pause wird benötigt, da der Roboter automatisch alle Motoren beim Ende des Progammes deaktiviert.</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="n">Motor</span>
|
||||
<span class="kn">import</span> <span class="nn">time</span>
|
||||
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">50</span><span class="p">)</span>
|
||||
<span class="n">Motor</span><span class="o">.</span><span class="n">power</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">50</span><span class="p">)</span>
|
||||
|
||||
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
|
||||
<a href="../index.html" class="btn btn-neutral float-left" title="compLib" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
236
lib/index.html
Normal file
|
@ -0,0 +1,236 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>compLib — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
|
||||
<link rel="search" title="Suche" href="../search.html" />
|
||||
<link rel="next" title="Motoren" href="classes/Motor.html" />
|
||||
<link rel="prev" title="Beispiele" href="../other/usage.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../gettingStarted/index.html">Erste Schritte</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">compLib</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="classes/Motor.html">Motoren</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">CompLib</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>compLib</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/lib/index.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="complib">
|
||||
<h1>compLib<a class="headerlink" href="#complib" title="Link zu dieser Überschrift">¶</a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="classes/Motor.html">Motoren</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="classes/Motor.html#dokumentation-der-klasse">Dokumentation der Klasse</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="classes/Motor.html#genauere-informationen">Genauere Informationen</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="classes/Motor.html#power-vs-speed-vs-pulsewidth">Power vs Speed vs PulseWidth</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="classes/Motor.html#normal-vs-multiple">Normal vs Multiple</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="classes/Motor.html#beispiele">Beispiele</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="classes/Motor.html#vorwarts-fahren">Vorwärts fahren</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="classes/Motor.html" class="btn btn-neutral float-right" title="Motoren" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="../other/usage.html" class="btn btn-neutral float-left" title="Beispiele" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
objects.inv
|
@ -1,13 +1,13 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Usage — CompLib 0.2.3 documentation</title>
|
||||
<title>Beispiele — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
|
@ -29,14 +29,15 @@
|
|||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Index" href="../genindex.html" />
|
||||
<link rel="search" title="Search" href="../search.html" />
|
||||
<link rel="next" title="Api" href="../lib/Api.html" />
|
||||
<link rel="prev" title="Competition Robot Library" href="../index.html" />
|
||||
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
|
||||
<link rel="search" title="Suche" href="../search.html" />
|
||||
<link rel="next" title="compLib" href="../lib/index.html" />
|
||||
<link rel="prev" title="FAQ" href="../faq.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -64,7 +65,7 @@
|
|||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
@ -82,21 +83,14 @@
|
|||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../index.html">Competition Robot Library</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Usage</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Api.html">Api</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Aruco.html">Aruco</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Display.html">Display</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Encoder.html">Encoder</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Linefollower.html">Linefollower Examples</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Logging.html">Logging</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Odom.html">Odometry</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/QC.html">Quality Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Robot.html">Robot</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/Vision.html">Vision</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../gettingStarted/index.html">Erste Schritte</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Beispiele</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#vorwarts-und-ruckwarts-fahren">Vorwärts und rückwärts fahren</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -143,13 +137,13 @@
|
|||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Usage</li>
|
||||
<li>Beispiele</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/other/usage.rst.txt" rel="nofollow"> View page source</a>
|
||||
<a href="../_sources/other/usage.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
@ -162,8 +156,10 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="usage">
|
||||
<span id="other-usage"></span><h1>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="beispiele">
|
||||
<span id="other-usage"></span><h1>Beispiele<a class="headerlink" href="#beispiele" title="Link zu dieser Überschrift">¶</a></h1>
|
||||
<div class="section" id="vorwarts-und-ruckwarts-fahren">
|
||||
<h2>Vorwärts und rückwärts fahren<a class="headerlink" href="#vorwarts-und-ruckwarts-fahren" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">time</span>
|
||||
<span class="kn">from</span> <span class="nn">compLib.Motor</span> <span class="kn">import</span> <span class="o">*</span>
|
||||
|
||||
|
@ -188,6 +184,7 @@
|
|||
<span class="n">main</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -198,10 +195,10 @@
|
|||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="../lib/Api.html" class="btn btn-neutral float-right" title="Api" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
<a href="../lib/index.html" class="btn btn-neutral float-right" title="compLib" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="../index.html" class="btn btn-neutral float-left" title="Competition Robot Library" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
<a href="../faq.html" class="btn btn-neutral float-left" title="FAQ" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -218,11 +215,11 @@
|
|||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
|
|
39
search.html
|
@ -1,13 +1,13 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Search — CompLib 0.2.3 documentation</title>
|
||||
<title>Suche — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
|
@ -30,13 +30,14 @@
|
|||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="_static/searchtools.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="#" />
|
||||
<link rel="index" title="Stichwortverzeichnis" href="genindex.html" />
|
||||
<link rel="search" title="Suche" href="#" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -64,7 +65,7 @@
|
|||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="#" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
|
@ -82,21 +83,11 @@
|
|||
|
||||
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="index.html">Competition Robot Library</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Usage</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Api.html">Api</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Aruco.html">Aruco</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Display.html">Display</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Encoder.html">Encoder</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/IRSensor.html">Infrared Sensor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Linefollower.html">Linefollower Examples</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Logging.html">Logging</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Motor.html">Motor</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Odom.html">Odometry</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/QC.html">Quality Control</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Robot.html">Robot</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Servo.html">Servo</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/Vision.html">Vision</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="gettingStarted/index.html">Erste Schritte</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="software/installation.html">Installationsanweisungen</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
@ -143,7 +134,7 @@
|
|||
|
||||
<li><a href="index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Search</li>
|
||||
<li>Suche</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
@ -163,7 +154,7 @@
|
|||
<noscript>
|
||||
<div id="fallback" class="admonition warning">
|
||||
<p class="last">
|
||||
Please activate JavaScript to enable the search functionality.
|
||||
Bitte aktiviere JavaScript, um die Suchfunktion zu nutzen.
|
||||
</p>
|
||||
</div>
|
||||
</noscript>
|
||||
|
@ -191,11 +182,11 @@
|
|||
|
||||
|
||||
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
|
|
225
software/installation.html
Normal file
|
@ -0,0 +1,225 @@
|
|||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="de" >
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Installationsanweisungen — CompLib 0.2.3 Dokumentation</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||||
<script src="../_static/jquery.js"></script>
|
||||
<script src="../_static/underscore.js"></script>
|
||||
<script src="../_static/doctools.js"></script>
|
||||
<script src="../_static/translations.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
||||
|
||||
|
||||
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
|
||||
<link rel="search" title="Suche" href="../search.html" />
|
||||
<link rel="next" title="FAQ" href="../faq.html" />
|
||||
<link rel="prev" title="Mein drittes Programm" href="../gettingStarted/thridProgram.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="../index.html" class="icon icon-home" alt="Documentation Home"> CompLib
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../gettingStarted/index.html">Erste Schritte</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installationsanweisungen</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#betriebssystem-aufsetzen">Betriebssystem aufsetzen</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Beispiele</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../lib/index.html">compLib</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="../index.html">CompLib</a>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
||||
|
||||
<li>Installationsanweisungen</li>
|
||||
|
||||
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
<a href="../_sources/software/installation.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<div class="section" id="installationsanweisungen">
|
||||
<span id="software-installation"></span><h1>Installationsanweisungen<a class="headerlink" href="#installationsanweisungen" title="Link zu dieser Überschrift">¶</a></h1>
|
||||
<p>Diese Anleitung dient dazu die Software auf dem Roboter neu aufzusetzen. Im normalen Gebraucht sollte dies jedoch nicht notwendig sein.</p>
|
||||
<div class="section" id="betriebssystem-aufsetzen">
|
||||
<h2>Betriebssystem aufsetzen<a class="headerlink" href="#betriebssystem-aufsetzen" title="Link zu dieser Überschrift">¶</a></h2>
|
||||
<p>Als Basis wird für den Roboter Raspberry Pi OS (64-bit) verwendet. Das 32-Bit Betriebssystem wird nicht unterstützt, da die Software-Komponenten nur für aarch64 bzw. arm64/v8 kompiliert werden.
|
||||
Genauere Informationen sind <a class="reference external" href="https://www.raspberrypi.com/software/operating-systems/">hier</a> zu finden.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
|
||||
<a href="../faq.html" class="btn btn-neutral float-right" title="FAQ" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
|
||||
|
||||
|
||||
<a href="../gettingStarted/thridProgram.html" class="btn btn-neutral float-left" title="Mein drittes Programm" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
|
||||
© Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
||||
|
||||
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
||||
|
||||
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|