Scroll text

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Scroll text

Post by Jan Lichtenbelt »

I have 3 texts of which I will show one on a LCD screen. In the program attached, I defined 3 strings. By means of a string-counter and a switch, I copy one of the 3 strings to the "actual" string, which will be shown on the LCD screen.
Is there an other, more easy, way?

Kind regards

Jan Lichtenbelt

PS. this is a MIAC program, but can be used for other controllers also. The switch can be found at "select string"
Attachments
MIAC_Stopwatch_V2.fcf
(14.95 KiB) Downloaded 289 times

User avatar
Steve
Matrix Staff
Posts: 3434
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Scroll text

Post by Steve »

It is ok to do this, but there may be a slightly better way...

If you are only using this "action" string once at that part of the program, you could instead remove the "str1", "str2" and "str3" variables and instead put PrintString("start"), PrintString("stop"), or PrintString("reset") in the switch statement. It will be a little quicker and also reduce the amount of RAM needed.

Alternatively, if you do require the specific strings in multiple places and you don't need simulation, you could embed them into the ROM of the device as constant strings (you'll need to do this in C code).

Post Reply