Skip to content

constants

All the constants of this library.

Modules:

Name Description
beeper

Beeper constants.

button

Button constants.

display

Display constants.

environment

Environment constants.

general

Global constants.

rgb_strip

RGB Strip constants.

Classes:

Name Description
RgbColor

RGB Color.

Attributes:

Name Type Description
BLACK int

Display color Black.

BMP280_ADDR int

I2C addresses for the sensors.

BRIGHT int

Bright intensity of a color.

DIM int

Dim intensity of a color.

DISPLAY_HEIGHT int

Height of the display in pixel.

DISPLAY_WIDTH int

Width of the display in pixel.

DUTY50 int

50% duty cycle

LED_COUNT int

The amount of leds in the strip on the AALeC.

LINE_HEIGHT int

Height of a text line on the display in pixel.

MAX_LINE_COUNT int

Number of text lines on the display.

MEDIUM int

Medium intensity of a color.

PIN_ADC int

Pin number of the adc pin (not physically the same pin as the button!)

PIN_BEEPER int

Pin number of the beeper.

PIN_BUTTON int

Pin number of the button in the rotary encoder.

PIN_ENCODER_TRACK_1 int

Pin number of the first track of the encoder.

PIN_ENCODER_TRACK_2 int

Pin number of the second track of the encoder.

PIN_RGB_STRIP int

Pin number of the rgb strip.

PIN_RX int

Pin number of the RX port.

PIN_SCL int

Pin number of the scl port for i2c.

PIN_SDA int

Pin number of the sda port for i2c.

PIN_TX int

Pin number of the TX port.

PRESSED int

Value of a pressed button.

RELEASED int

Value of a released button.

SAMPLE_PERIOD int

Sample period for debouncing the button in ms.

WHITE int

Display color White.

c_blue RgbColor

Blue color (medium brightness)

c_cyan RgbColor

Cyan color (medium brightness)

c_green RgbColor

Green color (medium brightness)

c_off RgbColor

Led Off

c_purple RgbColor

Purple color (medium brightness)

c_red RgbColor

Red color (medium brightness)

c_white RgbColor

White color (medium brightness)

c_yellow RgbColor

Yellow color (medium brightness)

t_a_1 int

Frequency of the tone A1

t_a_2 int

Frequency of the tone A2

t_c_1 int

Frequency of the tone C1

t_c_2 int

Frequency of the tone C1

t_d_1 int

Frequency of the tone D1

t_e_1 int

Frequency of the tone E1

t_f_1 int

Frequency of the tone F1

t_g_1 int

Frequency of the tone G1

t_h_1 int

Frequency of the tone H1

t_off int

Frequency off

BLACK module-attribute

BLACK: int = const(0)

Display color Black.

BMP280_ADDR module-attribute

BMP280_ADDR: int = const(118)

I2C addresses for the sensors.

BRIGHT module-attribute

BRIGHT: int = const(200)

Bright intensity of a color.

DIM module-attribute

DIM: int = const(50)

Dim intensity of a color.

DISPLAY_HEIGHT module-attribute

DISPLAY_HEIGHT: int = const(64)

Height of the display in pixel.

DISPLAY_WIDTH module-attribute

DISPLAY_WIDTH: int = const(128)

Width of the display in pixel.

DUTY50 module-attribute

DUTY50: int = const(512)

50% duty cycle

LED_COUNT module-attribute

LED_COUNT: int = const(5)

The amount of leds in the strip on the AALeC.

LINE_HEIGHT module-attribute

LINE_HEIGHT: int = const(12)

Height of a text line on the display in pixel.

MAX_LINE_COUNT module-attribute

MAX_LINE_COUNT: int = const(5)

Number of text lines on the display.

MEDIUM module-attribute

MEDIUM: int = const(100)

Medium intensity of a color.

PIN_ADC module-attribute

PIN_ADC: int = const(0)

Pin number of the adc pin (not physically the same pin as the button!)

PIN_BEEPER module-attribute

PIN_BEEPER: int = const(15)

Pin number of the beeper.

PIN_BUTTON module-attribute

PIN_BUTTON: int = const(0)

Pin number of the button in the rotary encoder.

PIN_ENCODER_TRACK_1 module-attribute

PIN_ENCODER_TRACK_1: int = const(12)

Pin number of the first track of the encoder.

PIN_ENCODER_TRACK_2 module-attribute

PIN_ENCODER_TRACK_2: int = const(14)

Pin number of the second track of the encoder.

PIN_RGB_STRIP module-attribute

PIN_RGB_STRIP: int = const(2)

Pin number of the rgb strip.

PIN_RX module-attribute

PIN_RX: int = const(3)

Pin number of the RX port.

PIN_SCL module-attribute

PIN_SCL: int = const(5)

Pin number of the scl port for i2c.

PIN_SDA module-attribute

PIN_SDA: int = const(4)

Pin number of the sda port for i2c.

PIN_TX module-attribute

PIN_TX: int = const(1)

Pin number of the TX port.

PRESSED module-attribute

PRESSED: int = const(1)

Value of a pressed button.

RELEASED module-attribute

RELEASED: int = const(0)

Value of a released button.

SAMPLE_PERIOD module-attribute

SAMPLE_PERIOD: int = const(6)

Sample period for debouncing the button in ms.

WHITE module-attribute

WHITE: int = const(1)

Display color White.

c_blue module-attribute

c_blue: RgbColor = RgbColor(0, 0, 100)

Blue color (medium brightness)

c_cyan module-attribute

c_cyan: RgbColor = RgbColor(0, 50, 50)

Cyan color (medium brightness)

c_green module-attribute

c_green: RgbColor = RgbColor(0, 100, 0)

Green color (medium brightness)

c_off module-attribute

c_off: RgbColor = RgbColor(0, 0, 0)

Led Off

c_purple module-attribute

c_purple: RgbColor = RgbColor(50, 0, 50)

Purple color (medium brightness)

c_red module-attribute

c_red: RgbColor = RgbColor(100, 0, 0)

Red color (medium brightness)

c_white module-attribute

c_white: RgbColor = RgbColor(33, 33, 33)

White color (medium brightness)

c_yellow module-attribute

c_yellow: RgbColor = RgbColor(50, 50, 0)

Yellow color (medium brightness)

t_a_1 module-attribute

t_a_1: int = const(440)

Frequency of the tone A1

t_a_2 module-attribute

t_a_2: int = const(880)

Frequency of the tone A2

t_c_1 module-attribute

t_c_1: int = const(262)

Frequency of the tone C1

t_c_2 module-attribute

t_c_2: int = const(523)

Frequency of the tone C1

t_d_1 module-attribute

t_d_1: int = const(294)

Frequency of the tone D1

t_e_1 module-attribute

t_e_1: int = const(330)

Frequency of the tone E1

t_f_1 module-attribute

t_f_1: int = const(349)

Frequency of the tone F1

t_g_1 module-attribute

t_g_1: int = const(392)

Frequency of the tone G1

t_h_1 module-attribute

t_h_1: int = const(494)

Frequency of the tone H1

t_off module-attribute

t_off: int = const(0)

Frequency off

RgbColor

Bases: namedtuple('RgbColorBase', ['r', 'g', 'b'])

RGB Color.

Attributes:

Name Type Description
r int

red part of the color. (0-255)

g int

green part of the color. (0-255)

b int

blue part of the color. (0-255)