from pybricks.hubs import TechnicHub
from pybricks.pupdevices import Motor
from pybricks.parameters import Button, Color, Direction, Port, Side, Stop
from pybricks.robotics import DriveBase
from pybricks.tools import wait, StopWatch

#GBC 51 Gravel Works
hub = TechnicHub()

#Initialize motors
motor_verticallift = Motor(Port.B) #Red
motor_wavemachine = Motor(Port.C) #Orange
motor_dualconveyor = Motor(Port.D) #Yellow

#Start motors
motor_wavemachine.dc(25)
wait(500)
motor_dualconveyor.dc(-60)
wait(500)
motor_verticallift.dc(30)
wait(500)
motor_verticallift.dc(-30)
wait(500)

#Start loop
while True:
	#First run Elevator to the top to dump all the GBC Balls
	#Syntax is (Speed, Time ms, Then, Wait)
	motor_verticallift.run_time(-3000, 10000, Stop.HOLD, True)
	wait(500)
	motor_verticallift.run_time(3000, 12000, Stop.HOLD, True)
	wait(500)

    

