Class Keyboard
Encapsulates a standard 108-key keyboard as a Meadow IO Extender
Assembly: Meadow.Keyboard.dll
View Source
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
public Keyboard.PinDefinitions Pins { get; }
Methods
CreateDigitalInterruptPort(IPin)
Creates an input for a keyboard key
View Source
public IDigitalInterruptPort CreateDigitalInterruptPort(IPin pin)
Returns
Meadow.Hardware.IDigitalInterruptPort
Parameters
Type | Name |
---|---|
Meadow.Hardware.IPin | pin |
CreateDigitalInterruptPort(IPin, InterruptMode)
Creates an input for a keyboard key
View Source
public IDigitalInterruptPort CreateDigitalInterruptPort(IPin pin, InterruptMode interruptMode)
Returns
Meadow.Hardware.IDigitalInterruptPort
Parameters
Type | Name |
---|---|
Meadow.Hardware.IPin | pin |
Meadow.Hardware.InterruptMode | interruptMode |
CreateDigitalInterruptPort(IPin, InterruptMode, ResistorMode, TimeSpan, TimeSpan)
Creates an input for a keyboard key
View Source
public IDigitalInterruptPort CreateDigitalInterruptPort(IPin pin, InterruptMode interruptMode, ResistorMode resistorMode, TimeSpan debounceDuration, TimeSpan glitchDuration)
Returns
Meadow.Hardware.IDigitalInterruptPort
Parameters
Type | Name |
---|---|
Meadow.Hardware.IPin | pin |
Meadow.Hardware.InterruptMode | interruptMode |
Meadow.Hardware.ResistorMode | resistorMode |
System.TimeSpan | debounceDuration |
System.TimeSpan | glitchDuration |
Dispose(bool)
Dispose of the object
View Source
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Is disposing |
Dispose()
Releases resources created by the Keyboard instance
View Source
public void Dispose()
CreateDigitalOutputPort(IPin, bool, OutputType)
Creates an output for a Keyboard indicator
View Source
public IDigitalOutputPort CreateDigitalOutputPort(IPin pin, bool initialState = false, OutputType initialOutputType = OutputType.PushPull)
Returns
Meadow.Hardware.IDigitalOutputPort
Parameters
Type | Name |
---|---|
Meadow.Hardware.IPin | pin |
System.Boolean | initialState |
Meadow.Hardware.OutputType | initialOutputType |
Exceptions
System.ArgumentException
System.NotImplementedException
Implements
Meadow.Hardware.IDigitalInterruptController
Meadow.Hardware.IDigitalOutputController
Meadow.Hardware.IPinController
System.IDisposable