forked from Lego-Panda/pybricks-code-2025-2026
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
34 lines (31 loc) · 802 Bytes
/
main.py
File metadata and controls
34 lines (31 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from pybricks.hubs import PrimeHub
from pybricks.pupdevices import Motor, ColorSensor
from pybricks.parameters import Button, Color, Direction, Port, Side, Stop, Axis
from pybricks.robotics import DriveBase
from pybricks.tools import wait, StopWatch, hub_menu
from robot_conf import *
from functions import *
from runs import *
hub = PrimeHub(Axis.Y, Axis.Z)
hub.display.orientation(Side.BOTTOM)
selected = hub_menu("H","1", "2", "3", "4", "5", "6", "7", "8", "B")
if selected == "H":
leftwheel.run(1000)
rightwheel.run(1000)
wait(100000000)
if selected == "1":
run1()
if selected == "2":
run2()
if selected == "3":
run3()
if selected == "4":
run4()
if selected == "5":
run5()
if selected == "6":
pass
if selected == "7":
run7()
if selected == "8":
pass