nanoFramework.Iot.Device.A4988 1.1.931

Prefix Reserved
dotnet add package nanoFramework.Iot.Device.A4988 --version 1.1.931
                    
NuGet\Install-Package nanoFramework.Iot.Device.A4988 -Version 1.1.931
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.A4988" Version="1.1.931" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.A4988" Version="1.1.931" />
                    
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.A4988" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nanoFramework.Iot.Device.A4988 --version 1.1.931
                    
#r "nuget: nanoFramework.Iot.Device.A4988, 1.1.931"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nanoFramework.Iot.Device.A4988@1.1.931
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nanoFramework.Iot.Device.A4988&version=1.1.931
                    
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.A4988&version=1.1.931
                    
Install as a Cake Tool

4-Wire stepper motor & A4988 driver board

A stepper motor is an electromechanical device which converts electrical pulses into discrete mechanical movements. The shaft or spindle of a stepper motor rotates in discrete step increments when electrical command pulses are applied to it in the proper sequence. The motors rotation has several direct relationships to these applied input pulses. The sequence of the applied pulses is directly related to the direction of motor shafts rotation. The speed of the motor shafts rotation is directly related to the frequency of the input pulses and the length of rotation is directly related to the number of input pulses applied. One of the most significant advantages of a stepper motor is its ability to be accurately controlled in an open loop system. Open loop control means no feedback information about position is needed. This type of control eliminates the need for expensive sensing and feedback devices such as optical encoders. Your position is known simply by keeping track of the input step pulses.

Documentation

You can find the A4988 documentation here.

Connections

VDD - connect to 3-5.5V (driver supply voltage)

VMOT - connect to 8-35V (motor supply voltage)

GND - connect to GND

1A, 1B, 2A, 2B - connect to the 4 coils of motor

DIR - connect to microcontroller pin

STEP - connect to microcontroller pin

Usage

using Iot.Device.A4988;
using System;

// Pinout for MCU please adapt depending on your MCU
// Any regular GPIO will work
const byte stepPin = 10;
const byte dirPin = 11;
const Microsteps microsteps = Microsteps.FullStep;
const ushort fullStepsPerRotation = 200;
TimeSpan sleepTime = TimeSpan.Zero;
using (var motor = new A4988(stepPin, dirPin, microsteps, fullStepsPerRotation, sleepTime))
{
    var direction = true;
    while (true)
    {
        var rotationDegree = (direction ? 1 : -1) * 360;
        motor.Rotate(UnitsNet.Angle.FromDegrees(rotationDegree));
        direction = !direction;
        System.Threading.Thread.Sleep(1000);
    }
}
Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.931 271 11/10/2025
1.1.907 213 10/2/2025
1.1.889 198 7/28/2025
1.1.869 294 4/2/2025
1.1.864 255 4/2/2025
1.1.852 289 3/11/2025
1.1.846 271 3/10/2025
1.1.822 211 2/26/2025
1.1.775 222 2/4/2025
1.1.772 226 2/4/2025
1.1.759 212 1/31/2025
1.1.755 220 1/31/2025
1.1.743 211 1/20/2025
1.1.737 215 1/13/2025
1.1.718 220 12/30/2024
1.1.696 224 12/16/2024
1.1.673 245 10/23/2024
1.1.656 216 10/3/2024
1.1.639 243 9/6/2024
1.1.631 224 8/28/2024
1.1.613 221 8/9/2024
1.1.601 217 7/26/2024
1.1.590 212 7/17/2024
1.1.573 236 6/19/2024
1.1.570 218 6/14/2024
1.1.560 218 5/29/2024
1.1.548 229 5/15/2024
1.1.536 255 4/15/2024
1.1.514 246 3/22/2024
1.1.494 229 2/28/2024
1.1.474 270 1/24/2024
1.1.462 281 1/5/2024
1.1.458 255 12/20/2023
1.1.436 256 11/10/2023
1.1.403 238 10/6/2023
1.1.396 222 9/27/2023
1.1.384 259 9/6/2023
1.1.378 259 8/16/2023
1.1.369 303 8/2/2023
1.1.363 273 7/28/2023
1.1.357 293 7/19/2023
1.1.354 273 7/14/2023
1.1.345 344 6/21/2023
1.1.341 308 6/14/2023
1.1.337 291 6/7/2023
1.1.335 309 6/2/2023
1.1.329 283 5/26/2023
1.1.313 293 5/12/2023
1.1.302 294 5/10/2023
1.1.297 308 5/3/2023
1.1.273 379 3/17/2023
1.1.267 394 3/10/2023
1.1.263 412 3/8/2023
1.1.259 408 2/27/2023
1.1.256 427 2/24/2023
1.1.253 425 2/22/2023
1.1.222 454 1/9/2023
1.1.208 461 1/3/2023
1.1.203 465 12/28/2022
1.1.153 527 11/5/2022
1.1.141 565 10/25/2022
1.1.122 616 10/12/2022
1.1.114 579 10/8/2022
1.1.95 617 9/22/2022
1.1.87 649 9/15/2022
1.1.73 570 9/8/2022
1.1.63 571 9/3/2022
1.1.47 609 8/15/2022
1.1.40 601 8/6/2022
1.1.38 587 8/5/2022
1.1.32 600 8/2/2022
1.1.28 587 8/1/2022
1.1.13 636 7/24/2022
1.1.10 611 7/23/2022
1.0.17.58726 606 7/7/2022
1.0.10.15865 624 7/5/2022
1.0.2.28143 605 6/29/2022