Skip to main content

Class Keyboard

Encapsulates a standard 108-key keyboard as a Meadow IO Extender

Assembly: Meadow.Keyboard.dll
View Source
Declaration
public class Keyboard : IDigitalInterruptController, IDigitalOutputController, IPinController, IDisposable

Implements:
Meadow.Hardware.IDigitalInterruptController, Meadow.Hardware.IDigitalOutputController, Meadow.Hardware.IPinController, System.IDisposable

Properties

Pins

d The pins

View Source
Declaration
public Keyboard.PinDefinitions Pins { get; }

Methods

CreateDigitalInterruptPort(IPin)

Creates an input for a keyboard key

View Source
Declaration
public IDigitalInterruptPort CreateDigitalInterruptPort(IPin pin)
Returns

Meadow.Hardware.IDigitalInterruptPort

Parameters
TypeName
Meadow.Hardware.IPinpin

CreateDigitalInterruptPort(IPin, InterruptMode)

Creates an input for a keyboard key

View Source
Declaration
public IDigitalInterruptPort CreateDigitalInterruptPort(IPin pin, InterruptMode interruptMode)
Returns

Meadow.Hardware.IDigitalInterruptPort

Parameters
TypeName
Meadow.Hardware.IPinpin
Meadow.Hardware.InterruptModeinterruptMode

CreateDigitalInterruptPort(IPin, InterruptMode, ResistorMode, TimeSpan, TimeSpan)

Creates an input for a keyboard key

View Source
Declaration
public IDigitalInterruptPort CreateDigitalInterruptPort(IPin pin, InterruptMode interruptMode, ResistorMode resistorMode, TimeSpan debounceDuration, TimeSpan glitchDuration)
Returns

Meadow.Hardware.IDigitalInterruptPort

Parameters
TypeName
Meadow.Hardware.IPinpin
Meadow.Hardware.InterruptModeinterruptMode
Meadow.Hardware.ResistorModeresistorMode
System.TimeSpandebounceDuration
System.TimeSpanglitchDuration

Dispose(bool)

Dispose of the object

View Source
Declaration
protected virtual void Dispose(bool disposing)
Parameters
TypeNameDescription
System.BooleandisposingIs disposing

Dispose()

Releases resources created by the Keyboard instance

View Source
Declaration
public void Dispose()

CreateDigitalOutputPort(IPin, bool, OutputType)

Creates an output for a Keyboard indicator

View Source
Declaration
public IDigitalOutputPort CreateDigitalOutputPort(IPin pin, bool initialState = false, OutputType initialOutputType = OutputType.PushPull)
Returns

Meadow.Hardware.IDigitalOutputPort

Parameters
TypeName
Meadow.Hardware.IPinpin
System.BooleaninitialState
Meadow.Hardware.OutputTypeinitialOutputType
Exceptions

System.ArgumentException

System.NotImplementedException

Implements

  • Meadow.Hardware.IDigitalInterruptController
  • Meadow.Hardware.IDigitalOutputController
  • Meadow.Hardware.IPinController
  • System.IDisposable