Beispiel #1
0
 def setup(self):
     limSwitch = DigitalInput(self.tamp, CONVEYOR_LIMIT_SWITCH)
     conveyorMotor = Motor(self.tamp, BELT_MOTOR_CONTROLLER_DIRECTION,
                           BELT_MOTOR_CONTROLLER_PWM)
     conveyorEncoder = Encoder(self.tamp, BELT_MOTOR_ENCODER_YELLOW,
                               BELT_MOTOR_ENCODER_WHITE)
     self.pickup = PickupModule(Timer(), limSwitch, conveyorMotor,
                                conveyorEncoder)
     self.pickup.start()
Beispiel #2
0
class TestPickup(SyncedSketch):

    def setup(self):
        limSwitch = DigitalInput(self.tamp, CONVEYOR_LIMIT_SWITCH)
        conveyorMotor = Motor(self.tamp, BELT_MOTOR_CONTROLLER_DIRECTION, BELT_MOTOR_CONTROLLER_PWM)
        conveyorEncoder = Encoder(self.tamp, BELT_MOTOR_ENCODER_YELLOW, BELT_MOTOR_ENCODER_WHITE)
        self.pickup = PickupModule(Timer(), limSwitch, conveyorMotor, conveyorEncoder)
        self.pickup.start()

    def loop(self):
        response = self.pickup.run()
        if response != MODULE_PICKUP:
            self.stop()
Beispiel #3
0
class TestPickup(SyncedSketch):
    def setup(self):
        limSwitch = DigitalInput(self.tamp, CONVEYOR_LIMIT_SWITCH)
        conveyorMotor = Motor(self.tamp, BELT_MOTOR_CONTROLLER_DIRECTION,
                              BELT_MOTOR_CONTROLLER_PWM)
        conveyorEncoder = Encoder(self.tamp, BELT_MOTOR_ENCODER_YELLOW,
                                  BELT_MOTOR_ENCODER_WHITE)
        self.pickup = PickupModule(Timer(), limSwitch, conveyorMotor,
                                   conveyorEncoder)
        self.pickup.start()

    def loop(self):
        response = self.pickup.run()
        if response != MODULE_PICKUP:
            self.stop()
 def setup(self):
     self.timer = Timer()
     limSwitch = DigitalInput(self.tamp, CONVEYOR_LIMIT_SWITCH)
     conveyorMotor = Motor(self.tamp, BELT_MOTOR_CONTROLLER_DIRECTION, BELT_MOTOR_CONTROLLER_PWM)
     conveyorEncoder = Encoder(self.tamp, BELT_MOTOR_ENCODER_YELLOW, BELT_MOTOR_ENCODER_WHITE)
     self.pickup = PickupModule(Timer(), limSwitch, conveyorMotor, conveyorEncoder)
     self.pickup.start()