Go to file
Lars Haferkamp 2157ec4101 Merge pull request 'Funktion für neue Schaufel und Doku' (#19) from laptop02 into main
Reviewed-on: #19
2024-01-03 16:26:50 +00:00
hub Initial code with Python stubs for Lego Spike API, Go Robot Code and an example how to structure our code 2023-02-14 17:43:41 +01:00
spike Initial code with Python stubs for Lego Spike API, Go Robot Code and an example how to structure our code 2023-02-14 17:43:41 +01:00
.gitignore Initial code with Python stubs for Lego Spike API, Go Robot Code and an example how to structure our code 2023-02-14 17:43:41 +01:00
README.md TEst 2023-11-08 19:03:45 +01:00
gorobot.py Initial code with Python stubs for Lego Spike API, Go Robot Code and an example how to structure our code 2023-02-14 17:43:41 +01:00
iqrobot.py Merge branch 'main' into laptop02 2024-01-03 17:25:13 +01:00
iqrobot_schreiber.py WIP: Fahren mit Regler 2023-09-27 21:00:25 +02:00
main.py Merge branch 'main' into laptop02 2024-01-03 17:25:13 +01:00
vscode-lego-extension-precompile.png Initial code with Python stubs for Lego Spike API, Go Robot Code and an example how to structure our code 2023-02-14 17:43:41 +01:00
vscode-lego-extension-settings.png Initial code with Python stubs for Lego Spike API, Go Robot Code and an example how to structure our code 2023-02-14 17:43:41 +01:00

README.md

Entwickler Setup

Git

Importiere den Code entweder über die Shell

git clone https://git.makerlab-murnau.de/Projekte/LegoLeague.git

oder einen Git Client:

Benutzername und Passwort für Makerlab eingeben

Übersicht über Git Commands: https://ndpsoftware.com/git-cheatsheet.html#loc=workspace;

Einfacher Workflow

  1. git pull --rebase (evtl git stash vorher)
  2. git add meincode.py (Dateien die ich Committen will, oder auch nur einzelne Zeilen)
  3. git commit -m 'ich habe was an meincode.py geändert' (lokaler Commit)
  4. git push -u origin main (lokalen Commit auf den Server hochladen)

VS Code

In der VSCode Extension pre-compile einstellen: VSCode Lego Settings VSCode Lego Precompile

Code auf den Spike laufen lassen

  1. Über die VSCode Extension auf einen Slot hochladen (Extension Button oder F1->LEGO)

  2. Slot starten (kann auch über die "autostart" Option im Kopf des Codes automatisiert werden)

    # LEGO type:standard slot:5 autostart
    

Code als gemeinsame Bibiothek entwickeln und auf dem Spike ausführen

  1. Eigene Python Datei anlegen zB meincode.py

  2. Auf einen Slot hochladen (am besten Pre-Compile unter VS Code Settings einstellen, siehe Entwickeler Setup)

  3. importFile Funktion aus der main.py nutzen:

    importFile(slotid=6, precompiled=True, module_name="meincode")
    import meincode as mc
    print(mc.HELLO) 
    

Siehe auch https://forums.firstinspires.org/forum/general-discussions/first-programs/first-lego-league/the-challenge/programming-ab/93873-spike-prime-programming-lessons-for-first-lego-league-challenge-teams

Project Setup History

git clone https://github.com/fluffyhuskystudio/spike-prime-api.git
cd LegoLeague
cp -r ../spike-prime-api/hub ./
cp -r ../spike-prime-api/spike ./