nanoFramework.Iot.Device.A4988 1.1.494

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package nanoFramework.Iot.Device.A4988 --version 1.1.494
NuGet\Install-Package nanoFramework.Iot.Device.A4988 -Version 1.1.494
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.494" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nanoFramework.Iot.Device.A4988 --version 1.1.494
#r "nuget: nanoFramework.Iot.Device.A4988, 1.1.494"
#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.
// Install nanoFramework.Iot.Device.A4988 as a Cake Addin
#addin nuget:?package=nanoFramework.Iot.Device.A4988&version=1.1.494

// Install nanoFramework.Iot.Device.A4988 as a Cake Tool
#tool nuget:?package=nanoFramework.Iot.Device.A4988&version=1.1.494

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)
Additional computed target framework(s)
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.494 31 2/28/2024
1.1.474 98 1/24/2024
1.1.462 117 1/5/2024
1.1.458 101 12/20/2023
1.1.436 144 11/10/2023
1.1.403 122 10/6/2023
1.1.396 109 9/27/2023
1.1.384 125 9/6/2023
1.1.378 126 8/16/2023
1.1.369 156 8/2/2023
1.1.363 117 7/28/2023
1.1.357 146 7/19/2023
1.1.354 124 7/14/2023
1.1.345 189 6/21/2023
1.1.341 147 6/14/2023
1.1.337 140 6/7/2023
1.1.335 145 6/2/2023
1.1.329 118 5/26/2023
1.1.313 127 5/12/2023
1.1.302 131 5/10/2023
1.1.297 137 5/3/2023
1.1.273 218 3/17/2023
1.1.267 214 3/10/2023
1.1.263 233 3/8/2023
1.1.259 227 2/27/2023
1.1.256 250 2/24/2023
1.1.253 243 2/22/2023
1.1.222 279 1/9/2023
1.1.208 282 1/3/2023
1.1.203 292 12/28/2022
1.1.153 360 11/5/2022
1.1.141 387 10/25/2022
1.1.122 431 10/12/2022
1.1.114 414 10/8/2022
1.1.95 439 9/22/2022
1.1.87 459 9/15/2022
1.1.73 391 9/8/2022
1.1.63 395 9/3/2022
1.1.47 420 8/15/2022
1.1.40 428 8/6/2022
1.1.38 408 8/5/2022
1.1.32 417 8/2/2022
1.1.28 412 8/1/2022
1.1.13 454 7/24/2022
1.1.10 416 7/23/2022
1.0.17.58726 418 7/7/2022
1.0.10.15865 439 7/5/2022
1.0.2.28143 420 6/29/2022