Open vegetablesalad opened 6 years ago
Try apply this options:
--led-multiplexing=1
or
--led-multiplexing=4 --led-row-addr-type=2
or
--led-multiplexing=5
or
from rgbmatrix import RGBMatrix, RGBMatrixOptions import time
options = RGBMatrixOptions() number_of_panels = 1 MATRIX_ROWS = 16 MATRIX_COLUMNS = 32 options.rows = MATRIX_ROWS / 2 options.cols = MATRIX_COLUMNS options.chain_length = 2 * number_of_panels display = RGBMatrix(options=options) height = display.height width = display.width
def chinese(x, y, red, green, blue):
scan_rate = MATRIX_ROWS / 4
xoffset = (MATRIX_COLUMNS / 4) * (x / (MATRIX_COLUMNS / 4))
yoffset = ((y + scan_rate) % (MATRIX_ROWS / 2)) / scan_rate
new_x = x + (MATRIX_COLUMNS / 4) * yoffset + xoffset
new_y = (y % scan_rate) + scan_rate * (y / (MATRIX_ROWS / 2))
return display.SetPixel(new_x, new_y, red, green, blue)
for x in range(0, width): for y in range(0, height): chinese(x, y, 255, 0, 0) print '({}, {})'.format(x, y) time.sleep(1)
or
from rgbmatrix import RGBMatrix, RGBMatrixOptions import time
options = RGBMatrixOptions() number_of_panels = 1 MATRIX_ROWS = 16 MATRIX_COLUMNS = 32 options.rows = MATRIX_ROWS / 2 options.cols = MATRIX_COLUMNS options.chain_length = 2 * number_of_panels display = RGBMatrix(options=options) height = display.height width = display.width
def chinese2(x, y, red, green, blue):
scan_rate = MATRIX_ROWS / 4
odd_quarter = ((y / scan_rate) % 2)
shift_even_quarter = (1 - odd_quarter) * scan_rate
shift_odd_quarter = odd_quarter * scan_rate
new_x = x + ((x + shift_even_quarter) / (MATRIX_COLUMNS / 4)) * (MATRIX_COLUMNS / 4) + shift_odd_quarter
new_y = (y % scan_rate) + scan_rate * (y / (MATRIX_ROWS / 2))
return display.SetPixel(new_x, new_y, red, green, blue)
for x in range(0, width): for y in range(0, height): chinese2(x, y, 255, 0, 0) print '({}, {})'.format(x, y) time.sleep(1)
Thanks, will try this tonight!
Did it work ? If not, you probably have to go through the datasheet and build a multiplex mapper and possibly send a pull request.
I managed to get it somewhat close. I'll post my results tonight or later this week.
Sorry didn't have any free time to work on my project, but just picked it up. So I tried quite a few combinations of settings and your examples, but can't quite get it working. Here are some of the things I tried:
from all the demos this setup got me the closest result:
sudo ./demo -D 0 --led-no-hardware-pulse --led-chain=1 --led-rows=16 --led-multiplexing=5 --led-row-addr-type=2 result: https://youtu.be/HAGbXrgpqEs
Your first python code sample result: https://youtu.be/72ZKh3QaEw4
And final python code result: https://youtu.be/Wj29KVa5SuI
doesn't look like I'm close, this panel must be quite different
I'm trying to get this module to work, but its jumbled up, I think I have tried every setting. Is it supported or it has some weird mapping I have to transform myself? Just want to check before committing onto remapping.
P10RGB doc PDF