Pamoja.Actuators 0.1.18

dotnet add package Pamoja.Actuators --version 0.1.18
                    
NuGet\Install-Package Pamoja.Actuators -Version 0.1.18
                    
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="Pamoja.Actuators" Version="0.1.18" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pamoja.Actuators" Version="0.1.18" />
                    
Directory.Packages.props
<PackageReference Include="Pamoja.Actuators" />
                    
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 Pamoja.Actuators --version 0.1.18
                    
#r "nuget: Pamoja.Actuators, 0.1.18"
                    
#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 Pamoja.Actuators@0.1.18
                    
#: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=Pamoja.Actuators&version=0.1.18
                    
Install as a Cake Addin
#tool nuget:?package=Pamoja.Actuators&version=0.1.18
                    
Install as a Cake Tool

Pamoja.Actuators

PCA9685 PWM and servo pulses, and stepper coil sequencing. One capability of pamoja, one memory-safe Rust core with bindings for TypeScript, Python, and C#.

read the guide documentation API reference

Install

dotnet add package Pamoja.Actuators
using Pamoja.Actuators;

This pulls in Pamoja.Native, the compiled engine. dotnet add package Pamoja is the whole framework in one package.

Example

The guide project's example, spliced here as it ran in CI.

From bindings/dotnet/samples/Pamoja.Guides/ActuatorsGuide.cs:

// A servo bank wants 50 Hz. The prescale register that produces it is derived
// from the part's 25 MHz internal oscillator, so a caller names the rate it wants
// rather than working the divider out.
byte prescale = Pca9685.PrescaleForFrequency(50);
Console.WriteLine(
    $"prescale  {prescale} gives {Pca9685.FrequencyForPrescale(prescale):F1} Hz");

// Each channel owns four consecutive registers, so a whole channel is written in
// one bus transaction rather than four.
Console.WriteLine($"channel 3 starts at register 0x{Pca9685.ChannelRegister(3):X2}");

// A centered hobby servo holds its output high for 1500 us of the 20 ms period.
// The part counts in 4096 steps per period, so that is where the pulse ends.
byte[] centered = Pwm.Servo(1500, 50);
Console.WriteLine($"centered servo goes low at count {Pwm.Counts(centered).Off} of 4096");

// Fully off carries its own flag rather than a zero duty, which would still hold
// the output high for the first count of every period.
bool flagged = Pwm.Counts(Pwm.FullOff()).Off != Pwm.Counts(Pwm.Duty(0)).Off;
Console.WriteLine($"full off flag set: {flagged}");

// A stepper is driven by walking a pattern of coil states. Half-step drive
// interleaves the one-coil and two-coil patterns, so it has twice as many.
using var motor = new Stepper(StepDrive.HalfStep);
Console.WriteLine($"coils     {Convert.ToString(motor.Coils, 2).PadLeft(4, '0')} at rest");
for (int step = 0; step < 2; step++)
{
    byte coils = motor.Step(StepDirection.Forward);
    Console.WriteLine(
        $"coils     {Convert.ToString(coils, 2).PadLeft(4, '0')} after a step");
}

// The patterns wrap, so the motor runs indefinitely either way, and an angle
// converts to whole steps: a quarter turn of a 1.8-degree motor is fifty of them.
for (int step = 2; step < Stepper.StepCount(StepDrive.HalfStep); step++)
{
    motor.Step(StepDirection.Forward);
}

Console.WriteLine(
    $"coils     {Convert.ToString(motor.Coils, 2).PadLeft(4, '0')} back at the start "
    + "of the cycle");
Console.WriteLine($"a quarter turn is {Stepper.StepsForDegrees(90.0f, 200)} steps");

The same capability in every language

Language Package Reference
Rust pamoja-actuators reference, docs.rs, install
TypeScript @pamoja/actuators reference, install
Python pamoja-actuators reference, install
C# Pamoja.Actuators reference, install

Documentation

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Pamoja.Actuators:

Package Downloads
Pamoja

The whole pamoja framework in one package: every capability of one memory-safe Rust core, behind an idiomatic C# facade, for IoT, robotics, and drones.

Pamoja.Sensing

Sensing and actuation: The parts wired to a board: a thermometer that checks its own bytes, a servo pulse, a stepper walking its coils, and a part of your own.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.18 39 9/11/2026
0.1.17 108 9/6/2026
0.1.16 107 9/5/2026
0.1.15 104 9/5/2026