C# Класс CyrusBuilt.MonoPi.LED.TM1638

Controller class for the TM1638/TM1640 board. It is a port of the TM1638 library by Ricardo Batista URL: http://code.google.com/p/tm1638-library/
Наследование: TM16XXBase
Показать файл Открыть проект

Открытые методы

Метод Описание
GetPushButtons ( ) : Byte

Gets a byte representing the buttons pushed. The display has 8 buttons, each representing one bit in the byte.

SendChar ( Byte pos, Byte data, System.Boolean dot ) : void

Sends a character to the display.

SetDisplayToBinNumber ( Byte number, Byte dots ) : void

Sets the display to a binary number.

SetDisplayToDecNumber ( ulong number, Byte dots, System.Boolean leadingZeros ) : void

Sets the display to a decimal number.

SetDisplayToDecNumberAt ( ulong number, Byte dots, Byte startPos, System.Boolean leadingZeros ) : void

Sets the display to a decimal number at the specified starting position

SetDisplayToHexNumber ( ulong number ) : void

Sets the display to hex number.

SetDisplayToSignedDecNumber ( long number, Byte dots, System.Boolean leadingZeros ) : void

Sets the display to signed a decimal number.

SetLed ( TM1638LedColor color, Byte pos ) : void

Sets the color of the character or digit at the specified position.

TM1638 ( IRaspiGpio data, IRaspiGpio clock, IRaspiGpio strobe, System.Boolean active, Byte intensity ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.LED.TM1638 class with the data pin, clock pin, strobe pin, a flag to set the display active, and the display intensity (brightness).

Описание методов

GetPushButtons() публичный Метод

Gets a byte representing the buttons pushed. The display has 8 buttons, each representing one bit in the byte.
public GetPushButtons ( ) : Byte
Результат Byte

SendChar() публичный Метод

Sends a character to the display.
public SendChar ( Byte pos, Byte data, System.Boolean dot ) : void
pos Byte /// The position at which to set the character. ///
data Byte /// The data (character) to set in the display. ///
dot System.Boolean /// Set true to turn on the dots. ///
Результат void

SetDisplayToBinNumber() публичный Метод

Sets the display to a binary number.
public SetDisplayToBinNumber ( Byte number, Byte dots ) : void
number Byte /// The binary number to set in the display. ///
dots Byte /// Set true to turn on the dots. ///
Результат void

SetDisplayToDecNumber() публичный Метод

Sets the display to a decimal number.
public SetDisplayToDecNumber ( ulong number, Byte dots, System.Boolean leadingZeros ) : void
number ulong /// The number to set in the display. ///
dots Byte /// Set true to turn on the dots. ///
leadingZeros System.Boolean /// Set true to lead the number with zeros. ///
Результат void

SetDisplayToDecNumberAt() публичный Метод

Sets the display to a decimal number at the specified starting position
public SetDisplayToDecNumberAt ( ulong number, Byte dots, Byte startPos, System.Boolean leadingZeros ) : void
number ulong /// The number to set in the display (if out of range, display will be /// cleared). ///
dots Byte /// Set true to turn on dots. ///
startPos Byte /// The starting position to place the number at. ///
leadingZeros System.Boolean /// Set true to lead the number with zeros. ///
Результат void

SetDisplayToHexNumber() публичный Метод

Sets the display to hex number.
public SetDisplayToHexNumber ( ulong number ) : void
number ulong /// The number to set. ///
Результат void

SetDisplayToSignedDecNumber() публичный Метод

Sets the display to signed a decimal number.
public SetDisplayToSignedDecNumber ( long number, Byte dots, System.Boolean leadingZeros ) : void
number long /// The signed decimal number to set in the display. ///
dots Byte /// Set true to turn on the dots. ///
leadingZeros System.Boolean /// Set true to lead the number with zeros. ///
Результат void

SetLed() публичный Метод

Sets the color of the character or digit at the specified position.
public SetLed ( TM1638LedColor color, Byte pos ) : void
color TM1638LedColor /// The color to set the digit/character to. ///
pos Byte /// The position of the character to change the color of. ///
Результат void

TM1638() публичный Метод

Initializes a new instance of the CyrusBuilt.MonoPi.LED.TM1638 class with the data pin, clock pin, strobe pin, a flag to set the display active, and the display intensity (brightness).
public TM1638 ( IRaspiGpio data, IRaspiGpio clock, IRaspiGpio strobe, System.Boolean active, Byte intensity ) : System
data IRaspiGpio /// The data pin. ///
clock IRaspiGpio /// The clock pin. ///
strobe IRaspiGpio /// The strobe pin. ///
active System.Boolean /// Set true to activate the display. ///
intensity Byte /// The display intensity (brightness). ///
Результат System