board707 / DMD_STM32

STM32Duino library for RGB, Monochrome and Two-color led matrix panels
GNU General Public License v3.0
54 stars 18 forks source link

Scrolling text is not smooth #86

Closed maxmurugan closed 2 months ago

maxmurugan commented 4 months ago

hi sir , Panel description Dimensions (in pixels) : 32x16 Scan factor: 1/4 Specifications Library version: 1.01 Platform: Pico

I try to using below setting and video file

https://github.com/board707/DMD_STM32/assets/4962604/39b253d4-a635-401f-9029-22d3d5240235

DMD_RGB <RGB32x16plainS4, COLOR_4BITS> dmd(mux_list, DMD_PIN_nOE, DMD_PIN_SCLK, custom_rgbpins, DISPLAYS_ACROSS, DISPLAYS_DOWN, ENABLE_DUAL_BUFFER);

maxmurugan commented 4 months ago

sm16208s 138 decoder ic

maxmurugan commented 4 months ago

please check

board707 commented 4 months ago

Sorry, I am on vacation now. I will return after 20 March

Try RGB32x16_S4_VitaliyDKZ pattern

maxmurugan commented 3 months ago

ok

board707 commented 3 months ago

Did you try the RGB32x16_S4_VitaliyDKZ pattern?

maxmurugan commented 3 months ago

tomorrow will check sir

board707 commented 3 months ago

Please be patient, I will resolve this when return home after 20th March

maxmurugan commented 3 months ago

RGB32x16_S4_VitaliyDKZ this setting working fine

I am using Scrolling text speed is 20 middle of the going slow when compared to the start of the text please check video and code

if ((millis() - prev_step) > interval) { dmd.setTextColor(col[R1], bg); // --red color if (dmd.stepMarquee(-1, 0) & 1) { // if text is reached screen bounds dmd.clearScreen(true); Refresh =0; dmd.drawMarquee(Final_Message, strlen(Final_Message) , dmd.width() - 5, (dmd.height() > 0) ? 0 : 0, 0); } dmd.swapBuffers(true); prev_step = millis(); }

https://github.com/board707/DMD_STM32/assets/4962604/8c103844-b4c5-40fb-90d1-04edc369ab71

maxmurugan commented 3 months ago

When your free please check this code

board707 commented 3 months ago

Ok

tahafathi2013 commented 3 months ago

RGB32x16_S4_VitaliyDKZ this setting working fine

I am using Scrolling text speed is 20 middle of the going slow when compared to the start of the text please check video and code

if ((millis() - prev_step) > interval) { dmd.setTextColor(col[R1], bg); // --red color if (dmd.stepMarquee(-1, 0) & 1) { // if text is reached screen bounds dmd.clearScreen(true); Refresh =0; dmd.drawMarquee(Final_Message, strlen(Final_Message) , dmd.width() - 5, (dmd.height() > 0) ? 0 : 0, 0); } dmd.swapBuffers(true); prev_step = millis(); }

IMG_9825.MOV

HOW ITS WORKING?? WHAT IS PIN CONFIG? WHAT IS PANEL CONFIGS? I USE STM32 BLUEPIL BUT NOT WORKING ON RGB PANELS.64X32 16 S.

Please full code is working upload here.

maxmurugan commented 3 months ago

I am using Raspberry pi Pico

board707 commented 3 months ago

When your free please check this code

What is the problem? As I understand, the pattern RGB32x16_S4_VitaliyDKZ is works with your panel?

maxmurugan commented 3 months ago

Scrolling text is not smooth from start to end

board707 commented 3 months ago

Yes, I noticed that too in some modes on my panels. It seems to me that when you have all the text on panels, the controller simply does not have time to update it between scans. Unfortunately, I don't have a solution to this problem right now. I can only advise reducing the text speed.

board707 commented 3 months ago

Hi @maxmurugan Please test a workaround to the "text is not smooth" problem. Your main scrolling code is:

if ((millis() - prev_step) > interval)
{
dmd.setTextColor(col[R1], bg); // --red color
if (dmd.stepMarquee(-1, 0) & 1) { // if text is reached screen bounds
dmd.clearScreen(true);
Refresh =0;
dmd.drawMarquee(Final_Message, strlen(Final_Message) , dmd.width() - 5, (dmd.height() > 0) ? 0 : 0, 0);
}
dmd.swapBuffers(true);
prev_step = millis();
}

Look at the code - the millis mark is updated at the very end, after the text has been shifted. This means that our update interval is not exactly 20ms, but 20ms + the time the controller needs to redraw the marquee. This time depends greatly on the number of letters on the screen. At the beginning and at the end there are only a couple of letters on the panel and everything is redrawn quickly, but in the middle you need to display all the text and this takes a long time. To eliminate unevenness, you need to move the time mark to the beginning of the cycle:

if ((millis() - prev_step) > interval)
{
prev_step = millis();
dmd.setTextColor(col[R1], bg); // --red color
if (dmd.stepMarquee(-1, 0) & 1) { // if text is reached screen bounds
dmd.clearScreen(true);
Refresh =0;
dmd.drawMarquee(Final_Message, strlen(Final_Message) , dmd.width() - 5, (dmd.height() > 0) ? 0 : 0, 0);
}
dmd.swapBuffers(true);

}
maxmurugan commented 3 months ago

sorry for delay i am trying today sir

board707 commented 2 months ago

Did you trying the fix I suggested?

maxmurugan commented 2 months ago

sorry for delay

now get scrolling text smooth

maxmurugan commented 2 months ago

https://github.com/board707/DMD_STM32/assets/4962604/b79e2a5e-6d32-4aa7-8431-a24837e1c4e2

maxmurugan commented 2 months ago

Future Multiline scrolling possible?

board707 commented 2 months ago

Thank you for your feedback.

Multiline scrolling possible?

This can be done with current code. Please open a new issue for it.