DMD scrolling Speed control
DMD scrolling Speed control
I am a beginner and I just bought two p10 displays for myself. After trying some prebuild codes available online I found that there's probably one problem with this DMD library that it may not let you control the scrolling Speed easily. Correct me if I am wrong. So if anyone can tell me a way to do that it'd be great. Also I like to control the texts and it's speed remotely using Bluetooth module.
-
- Posts: 181
- Joined: Fri Sep 20, 2013 7:25 am
Re: DMD scrolling Speed control
Scrolling speed is determined by how often you step the marquee. If you are using the original DMD library this is done by dmd.stepMarquee(), or for DMD2 it is dmd.marqueeScrollX(), which you execute within a timed loop. So all you need to do is adjust the timing of the loop to alter scrolling speed.
Re: DMD scrolling Speed control
Can you please explain a little bit more by giving some example codes that how I supposed to do that. thanks
Re: DMD scrolling Speed control
If you're using the original DMD library, in the example code "dmd_demo" you'll find this block of code:
It steps the marquee text "Scrolling Text" every 30ms. you can adjust the timing by changing the 30 in this lineHTH, Geoff
Code: Select all
dmd.drawMarquee("Scrolling Text",14,(32*DISPLAYS_ACROSS)-1,0);
long start=millis();
long timer=start;
boolean ret=false;
while(!ret){
if ((timer+30) < millis()) {
ret=dmd.stepMarquee(-1,0);
timer=millis();
}
}
Code: Select all
if ((timer+30) < millis()) {