public void Dispose() { if (step is null) { return; } step.Value = false; dir.Value = false; enable.Value = false; m0.Value = false; m1.Value = false; m2.Value = false; Pi.Wait(enableDelay); step.Close(); dir.Close(); enable.Close(); m0.Close(); m1.Close(); m2.Close(); step = null; dir = null; enable = null; m0 = null; m1 = null; m2 = null; }