You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Initializes a new instance of the <see cref="Drv8825" /> class.
42
+
/// </summary>
43
+
/// <param name="stepPin">Microcontroller pin connected to STEP driver pin. Used to set steps count.</param>
44
+
/// <param name="dirPin">Microcontroller pin connected to DIR driver pin. Used to set rotation direction.</param>
45
+
/// <param name="sleepPin">Microcontroller pin connected to SLP driver pin. Used to wake up and put the driver to sleep. Usually SLP need to connect with RST pin.</param>
46
+
/// <param name="fullStepsPerRotation">How many steps your motor need to make full rotation. For example, Nema 17 takes 200 full steps to complete full rotation.</param>
47
+
/// <param name="gpioController">GPIO controller. If it not passed, then it be created here.</param>
48
+
/// <param name="shouldDisposeGpioController">True to dispose the Gpio Controller when this class wiill be disposed.</param>
49
+
/// <param name="m0Pin">Microcontroller pin connected to M0 driver pin. Can be used to microsteps control. 0 if not connected.</param>
50
+
/// <param name="m1Pin">Microcontroller pin connected to M1 driver pin. Can be used to microsteps control. 0 if not connected.</param>
51
+
/// <param name="m2Pin">Microcontroller pin connected to M2 driver pin. Can be used to microsteps control. 0 if not connected.</param>
/// <exception cref="InvalidOperationException">Throws when sleep pin doesn't passed.</exception>
81
+
publicvoidWakeUp()
82
+
{
83
+
if(_sleepPin==null)
84
+
{
85
+
thrownewInvalidOperationException("Sleep pin does not passed. Try to create driver class with sleepPin param");
86
+
}
87
+
88
+
_sleepPin.Write(PinValue.High);
89
+
}
90
+
91
+
/// <summary>
92
+
/// Switch driver to sleep mode.
93
+
/// </summary>
94
+
/// <param name="millisecondsDelay">The number of milliseconds to wait before going to sleep. Use if you want give to driver time to process all previously sent steps.</param>
95
+
/// <exception cref="InvalidOperationException">Throws when sleep pin doesn't passed.</exception>
96
+
publicvoidSleep(intmillisecondsDelay=0)
97
+
{
98
+
if(_sleepPin==null)
99
+
{
100
+
thrownewInvalidOperationException("Sleep pin does not passed. Try to create driver class with sleepPin param");
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
0 commit comments