.. module:: max7219 ************** MAX7219 Module ************** This Module exposes all functionalities of Maxim MAX7219 Led Display driver (`datasheet `_). .. class:: MAX7219(spidrv, cs, clk=1000000) Creates an intance of a new MAX7219. :param spidrv: SPI Bus used '( SPI0, ... )' :param cs: Chip Select :param clk: Clock speed, default 100kHz Example: :: from maxim.max7219 import max7219 ... display = max7219.MAX7219(SPI0, D17) display.set_led(row, col, 1) # set to on the led in 0x0 position .. method:: shutdown(powerdown) Function to shutdown the display attached :param powerdown: Boolean ``True`` or ``False`` .. method:: set_scan_limit(limit) *only for 7-segments Display* Method that is used for seven segment displays that limits the number of digits. :param limit: number of banks (values 0 to 7). .. method:: set_intensity(intensity) Sets the intensity of the LEDs output. :param intensity: light output intensity (values 0 to 15). .. method:: clear_display() Clears the display by setting all LEDs to 0. .. method:: set_led(row, column, state) Allows the control of a single LED. :param row: is the row (values 0 to 7) :param column: is the column (values 0 to 7) :param state: is ``True`` for Led ON, and ``False`` for Led OFF .. method:: set_row(row, state) Sets an entire row. :param row: row to control (values from 0 to 7) :param state: is ``True`` for Led ON, and ``False`` for Led OFF .. method:: set_column(col, state) Sets an entire column. :param column: column to control (values from 0 to 7) :param state: is ``True`` for Led ON, and ``False`` for Led OFF .. method:: set_digit(digit, value, dp) *only for 7-segments Display* Used with 7 segment displays to set a digit to display on the 7 segments. :param digit: is the bank from 0 to 7 to display :param value: is the number value :param dp: is the decimal point .. method:: set_char(dev_num, digit, value, state) *only for 7-segments Display* :param digit: is the bank from 0 to 7 to display :param value: is the character value :param state: is ``True`` for Led ON, and ``False`` for Led OFF