24 static const uint32_t _pumpRelayPin=13;
25 static const uint32_t _stepperEnablePin = 10;
26 static const uint32_t _stepperDirPin=12;
27 static const uint32_t _stepperStepPin=11;
28 static const uint32_t _stepperM0Pin=13;
29 static const uint32_t _stepperM1Pin=14;
30 static const uint32_t _stepperM2Pin=8;
31 static const uint32_t _stepperMotorSteps=200;
38 : _stepper(_stepperMotorSteps, _stepperDirPin, _stepperStepPin, _stepperM0Pin, _stepperM1Pin, _stepperM2Pin)
41 pinMode(_stepperEnablePin, OUTPUT);
42 pinMode(_pumpRelayPin, OUTPUT);
45 void initVacuumValve()
48 _stepper.setMicrostep(8);
52 disconnectVesselFromVaccum();
55 void disconnectVesselFromVaccum()
59 void connectVesselToVaccum()
67 connectVesselToVaccum();
73 disconnectVesselFromVaccum();
77 digitalWrite(_pumpRelayPin, LOW);
81 digitalWrite(_pumpRelayPin, HIGH);
83 void rotateStepper(
double angle)
85 digitalWrite(_stepperEnablePin, HIGH);
87 _stepper.rotate(angle);
89 digitalWrite(_stepperEnablePin, LOW);
Implements pump control logic.
Definition: PumpController.h:22