Skip to main content

Class CJoystick

Represents a mikroBUS Joystick Click board

Assembly: CJoystick.dll
View Source
Declaration
public class CJoystick : As5013, IObservable<IChangeResult<AnalogJoystickPosition>>, ISamplingSensor<AnalogJoystickPosition>, ISensor<AnalogJoystickPosition>, ISamplingSensor, IAnalogJoystick, II2cPeripheral, IButton, ISensor<bool>, ISensor

Inheritance: System.Object -> Meadow.Foundation.ObservableBase<Meadow.Peripherals.Sensors.Hid.AnalogJoystickPosition> -> Meadow.Foundation.SamplingSensorBase<Meadow.Peripherals.Sensors.Hid.AnalogJoystickPosition> -> Meadow.Foundation.Sensors.Hid.As5013

Implements:

Expand

System.IObservable<Meadow.IChangeResult<Meadow.Peripherals.Sensors.Hid.AnalogJoystickPosition>>, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Peripherals.Sensors.Hid.AnalogJoystickPosition>, Meadow.Peripherals.Sensors.ISensor<Meadow.Peripherals.Sensors.Hid.AnalogJoystickPosition>, Meadow.Peripherals.Sensors.ISamplingSensor, Meadow.Peripherals.Sensors.Hid.IAnalogJoystick, Meadow.Hardware.II2cPeripheral, Meadow.Peripherals.Sensors.Buttons.IButton, Meadow.Peripherals.Sensors.ISensor<System.Boolean>, Meadow.Peripherals.Sensors.ISensor

Properties

LongClickedThreshold

The minimum duration for a long press

View Source
Declaration
public TimeSpan LongClickedThreshold { get; set; }

State

Returns the raw state of the center push button If pressed - returns true, otherwise false

View Source
Declaration
public bool State { get; }

Events

PressStarted

Raised when a press starts (the button is pushed down; circuit is closed).

View Source
Declaration
public event EventHandler PressStarted
Event Type

System.EventHandler

PressEnded

Raised when a press ends (the button is released; circuit is opened).

View Source
Declaration
public event EventHandler PressEnded
Event Type

System.EventHandler

Clicked

Raised when the button circuit is re-opened after it has been closed (at the end of a “press”.

View Source
Declaration
public event EventHandler Clicked
Event Type

System.EventHandler

LongClicked

Raised when the button circuit is pressed for at least LongClickedThreshold.

View Source
Declaration
public event EventHandler LongClicked
Event Type

System.EventHandler

Implements

  • System.IObservable<Meadow.IChangeResult<Meadow.Peripherals.Sensors.Hid.AnalogJoystickPosition>>
  • Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Peripherals.Sensors.Hid.AnalogJoystickPosition>
  • Meadow.Peripherals.Sensors.ISensor<Meadow.Peripherals.Sensors.Hid.AnalogJoystickPosition>
  • Meadow.Peripherals.Sensors.ISamplingSensor
  • Meadow.Peripherals.Sensors.Hid.IAnalogJoystick
  • Meadow.Hardware.II2cPeripheral
  • Meadow.Peripherals.Sensors.Buttons.IButton
  • Meadow.Peripherals.Sensors.ISensor<System.Boolean>
  • Meadow.Peripherals.Sensors.ISensor