Remarks

DigitalJoystick
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation
Characteristic Locus
Inheritance object > DigitalJoystick
Implements IDigitalJoystick IDisposable
Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.Sensors.Hid
Assembly Meadow.Foundation.dll

Syntax

public class DigitalJoystick : IDigitalJoystick, IDisposable

Constructors

DigitalJoystick(IDigitalInterruptPort, IDigitalInterruptPort, IDigitalInterruptPort, IDigitalInterruptPort)

Create a new DigitalJoystick object

Declaration
public DigitalJoystick(IDigitalInterruptPort portUp, IDigitalInterruptPort portDown, IDigitalInterruptPort portLeft, IDigitalInterruptPort portRight)

Parameters

Type Name Description
IDigitalInterruptPort portUp

The digital port for the up switch

IDigitalInterruptPort portDown

The digital port for the down switch

IDigitalInterruptPort portLeft

The digital port for the left switch

IDigitalInterruptPort portRight

The digital port for the right switch

Remarks

DigitalJoystick
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation

DigitalJoystick(IPin, IPin, IPin, IPin, ResistorMode)

Create a new DigitalJoystick object

Declaration
public DigitalJoystick(IPin pinUp, IPin pinDown, IPin pinLeft, IPin pinRight, ResistorMode resistorMode)

Parameters

Type Name Description
IPin pinUp

The pin connected to the up switch

IPin pinDown

The pin connected to the down switch

IPin pinLeft

The pin connected to the left switch

IPin pinRight

The pin connected to the right switch

ResistorMode resistorMode

The resistor mode for all pins

Remarks

DigitalJoystick
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation

Properties

ButtonDown

The PushButton class for the down digital joystick switch

Declaration
public PushButton ButtonDown { get; protected set; }

Property Value

Type Description
PushButton

Remarks

DigitalJoystick
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation

ButtonLeft

The PushButton class for the left digital joystick switch

Declaration
public PushButton ButtonLeft { get; protected set; }

Property Value

Type Description
PushButton

Remarks

DigitalJoystick
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation

ButtonRight

The PushButton class for the right digital joystick switch

Declaration
public PushButton ButtonRight { get; protected set; }

Property Value

Type Description
PushButton

Remarks

DigitalJoystick
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation

ButtonUp

The PushButton class for the up digital joystick switch

Declaration
public PushButton ButtonUp { get; protected set; }

Property Value

Type Description
PushButton

Remarks

DigitalJoystick
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation

IsDisposed

Is the object disposed

Declaration
public bool IsDisposed { get; }

Property Value

Type Description
bool

Remarks

DigitalJoystick
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation

Position

Get the current digital joystick position

Declaration
public DigitalJoystickPosition? Position { get; protected set; }

Property Value

Type Description
DigitalJoystickPosition?

Remarks

DigitalJoystick
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

Remarks

DigitalJoystick
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation

Dispose(bool)

Dispose of the object

Declaration
protected virtual void Dispose(bool disposing)

Parameters

Type Name Description
bool disposing

Is disposing

Remarks

DigitalJoystick
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation

Events

Updated

Raised when the digital joystick position changes

Declaration
public event EventHandler<ChangeResult<DigitalJoystickPosition>> Updated

Event Type

Type Description
EventHandler<ChangeResult<DigitalJoystickPosition>>

Remarks

DigitalJoystick
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation