def __init__(self, config): from rgbmatrix import RGBMatrix, RGBMatrixOptions options = RGBMatrixOptions() options.rows = config.getint('rows') options.cols = config.getint('cols') options.hardware_mapping = config['led_hardware_mapping'] options.chain_length = config.getint('led_chain') options.parallel = config.getint('led_parallel') options.pwm_bits = config.getint('led_pwm_bits') options.brightness = config.getint('led_brightness') options.pwm_lsb_nanoseconds = config.getint('led_pwm_lsb_nanoseconds') options.inverse_colors = config.getboolean('led_inverse') options.led_rgb_sequence = config['led_rgb_sequence'] options.pixel_mapper_config = config['led_pixel_mapper'] options.row_address_type = config.getint('led_row_addr_type') options.multiplexing = config.getint('led_multiplexing') options.scan_mode = config.getint('led_scan_mode') options.gpio_slowdown = config.getint('led_slowdown_gpio') options.disable_hardware_pulsing = config.getboolean( 'led_no_hardware_pulse') options.show_refresh_rate = config.getboolean('led_show_refresh') options.pwm_dither_bits = config.getint('led_pwm_dither_bits') #options.panel_type = config['led_panel_type'] self.matrix = RGBMatrix(options=options) self.offscreen_canvas = self.matrix.CreateFrameCanvas()
def rgbmatrix_options(): options = RGBMatrixOptions() options.multiplexing = 0 options.row_address_type = 0 options.brightness = 100 options.rows = led_panel_height options.cols = led_panel_width options.chain_length = 1 options.parallel = 1 options.hardware_mapping = 'regular' options.inverse_colors = False options.led_rgb_sequence = "RGB" options.gpio_slowdown = 3 options.pwm_lsb_nanoseconds = 150 options.show_refresh_rate = 0 options.disable_hardware_pulsing = True options.scan_mode = 0 options.pwm_bits = 11 options.daemon = 0 options.drop_privileges = 0 return options
def rgbmatrix_options(): options = RGBMatrixOptions() options.multiplexing = 6 options.row_address_type = 0 options.brightness = 80 options.rows = number_of_rows_per_panel options.cols = number_of_columns_per_panel options.chain_length = number_of_panels options.parallel = parallel options.hardware_mapping = 'regular' options.inverse_colors = False options.led_rgb_sequence = "BGR" options.gpio_slowdown = 1 options.pwm_lsb_nanoseconds = 130 options.show_refresh_rate = 0 options.disable_hardware_pulsing = False options.scan_mode = 0 options.pwm_bits = 11 options.daemon = 0 options.drop_privileges = 0 return options
def rgbmatrix_options(): options = RGBMatrixOptions() options.multiplexing = 1 options.row_address_type = 0 options.brightness = 60 options.rows = 64 options.cols = 64 options.chain_length = 1 options.parallel = 1 options.hardware_mapping = 'regular' options.inverse_colors = False options.led_rgb_sequence = "GBR" options.gpio_slowdown = 4 options.pwm_lsb_nanoseconds = 50 options.show_refresh_rate = 1 options.disable_hardware_pulsing = False options.scan_mode = 1 options.pwm_bits = 11 # options.daemon = 0 # options.drop_privileges = 0 # options.pixel_mapper_config = "U-mapper;Rotate:90" options.pixel_mapper_config = "Rotate:90" return RGBMatrix(options=options)