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

Derrihj
Posts: 61
Joined: Mon Jul 09, 2018 12:43 pm
Has thanked: 12 times
Been thanked: 3 times
Contact:

SCROLLING TEXT MANY TIMES ON LCD

Postby Derrihj » Fri Nov 15, 2019 7:15 am

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 15 times

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

Re: SCROLLING TEXT MANY TIMES ON LCD

Postby Benj » Fri Nov 15, 2019 5:02 pm

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.
These users thanked the author Benj for the post:
AbhijitR (Sat Nov 16, 2019 4:49 am)
Rating: 5.26%
 

Derrihj
Posts: 61
Joined: Mon Jul 09, 2018 12:43 pm
Has thanked: 12 times
Been thanked: 3 times
Contact:

Re: SCROLLING TEXT MANY TIMES ON LCD

Postby Derrihj » Fri Nov 15, 2019 7:56 pm

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
Posts: 174
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 107 times
Been thanked: 73 times
Contact:

Re: SCROLLING TEXT MANY TIMES ON LCD

Postby chipfryer27 » Tue Dec 03, 2019 2:22 pm

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 3 times
These users thanked the author chipfryer27 for the post (total 4):
LeighM (Tue Dec 03, 2019 2:25 pm) • Benj (Wed Dec 04, 2019 5:24 pm) • Derrihj (Thu Dec 05, 2019 2:38 am) • medelec35 (Thu Dec 05, 2019 8:14 am)
Rating: 21.05%
 

Derrihj
Posts: 61
Joined: Mon Jul 09, 2018 12:43 pm
Has thanked: 12 times
Been thanked: 3 times
Contact:

Re: SCROLLING TEXT MANY TIMES ON LCD

Postby Derrihj » Thu Dec 05, 2019 2:44 am

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.
These users thanked the author Derrihj for the post:
Benj (Thu Dec 05, 2019 11:18 am)
Rating: 5.26%