SCROLLING TEXT MANY TIMES ON LCD

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Derrihj
Posts: 348
Joined: Mon Jul 09, 2018 12:43 pm
Has thanked: 67 times
Been thanked: 33 times
Contact:

SCROLLING TEXT MANY TIMES ON LCD

Post by Derrihj »

Hi there please look at my flow chat in the created macros and advise me on how to write a simple code to scroll the text on the LCD (the simple way) if there happen to be any.I need a way to write a small flow chat to do the same text scrolling instead of repeating the same code many times like i've done.When you start my flow chat i display some massage to let you know what i want and the real thing am looking for is text scrolling position per position both to the Left and back to the Right. I was thinking that may be there is a simple code were you can feed in the positions you want to the left and back to the right instead of repeating the same code so many times like i've done which i think takes more of my MCU space.Thanks Guys am waiting to hear from you experts.
Attachments
PWM By KeyPad.fcf
(34.17 KiB) Downloaded 269 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: SCROLLING TEXT MANY TIMES ON LCD

Post by Benj »

Hello,

The Alphanumeric displays have a component macro called ScrollDisplay. Are you using this function?

Another way would be to parse a string variable with a startidx and a character count and this way you can easily scroll through your message without any duplicated code.

Derrihj
Posts: 348
Joined: Mon Jul 09, 2018 12:43 pm
Has thanked: 67 times
Been thanked: 33 times
Contact:

Re: SCROLLING TEXT MANY TIMES ON LCD

Post by Derrihj »

Thanks Benj yes am using "ScrollDisplay" but would you please help download my flowchat edit it and re-upload your edited flowchat, that way will be easy for me to learn the trick and get to know clearly what u are trying to say.Pease help.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 618
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 184 times
Been thanked: 195 times
Contact:

Re: SCROLLING TEXT MANY TIMES ON LCD

Post by chipfryer27 »

Hi Derrihj

I'm not in this forum too often so my reply may be too late.

Whilst Matrix staff provide excellent support it is a little unrealistic to expect them to modify your flowcode for you. Instead they point you in the direction of help and they and other forum members are usually very happy to answer follow on questions.

However I too have been stuck at times and have really needed an example or two so I've done one for you. Please note that there are many ways to scroll a display and I have just shown one very basic example that I hope helps. It isn't very elegant but the point is to show the display can be scrolled. You would need to modify to your exact requirements.

First I disabled all your branch icons associated with your example. Now, if an entry above 100 is entered the display will clear and display on the top line "ERROR !"
After a short delay the display clears and on the bottom line it will display "Please enter a number between 1 and 100".

Now that string is too big to de displayed all at once so we need to scroll it. Your LCD documentation will tell you how big the buffer is (typically 40 characters I think) although only sixteen can be displayed at any time. I created a loop that will scroll the display one character at a time until it reaches the end of the message. In this case 23 times.

I created a loop to do the above twice before returning.

Alternatively you could quite easily have the message scrolling in a loop until a key is pressed or some other such action. The attached really is just to give an example of the use of the scroll macro.

Hope this may provide you with some ideas.
Regards
Attachments
PWM By KeyPad.fcf
(36.88 KiB) Downloaded 289 times

Derrihj
Posts: 348
Joined: Mon Jul 09, 2018 12:43 pm
Has thanked: 67 times
Been thanked: 33 times
Contact:

Re: SCROLLING TEXT MANY TIMES ON LCD

Post by Derrihj »

Thank you very much chipfryer27 for showing me this trick, i didn't think about this trick and went on repeating the same code taking up allot of my MCU space, but with your trick i can now build on it to come up with different Text scrolling as i desire. This is exactly what i was looking for thanks a million times chipfryer27 this has been so helpful.

Post Reply