func FloorIndicator() { for { if elevdriver.GetFloor() > 0 { elevdriver.SetFloor(elevdriver.GetFloor()) } time.Sleep(100 * time.Millisecond) } }
func turnAround() { for { floor := elevdriver.GetFloor() go elevdriver.SetFloor(floor) switch floor { case 1: go elevdriver.MotorUp() case 4: go elevdriver.MotorDown() } } }