Page 1 of 1

Scroll one line only

Posted: Tue Jan 10, 2023 1:42 pm
by ctesla75
Hi All,
Have just got flowcode v9 mainly to play with esp32. I am trying to scroll just the first line of a display and keep the second line static. I have seen it done in C but I am wanting to do it in flowcode as I am not a C programmer
Thanks

Re: Scroll one line only

Posted: Tue Jan 10, 2023 2:18 pm
by ctesla75
Here is my attempt ,My idea was to clear the line i wanted to be static and reprint it at the same posistion after scrolling the whole display

Re: Scroll one line only

Posted: Tue Jan 10, 2023 3:27 pm
by RGV250
Hi,
I am sure there is a better way but this does what I think you want.
scroll_1.fcfx
(9.27 KiB) Downloaded 382 times
Bob

Re: Scroll one line only

Posted: Tue Jan 10, 2023 3:47 pm
by mnfisher
This is one way: Oops - too slow - now this is another way...

I've gone with a 'rotating' message - but you could just print relevant part of string.
Scroll2.fcfx
(10.82 KiB) Downloaded 405 times
Martin

Re: Scroll one line only

Posted: Tue Jan 10, 2023 9:06 pm
by ctesla75
Hi Martin ,
Thanks for the reply your code does what i want i just swapped which line rotates , excuse my ignorance but i cannot figure out how to change the abc lettering for my text

Re: Scroll one line only

Posted: Tue Jan 10, 2023 9:10 pm
by ctesla75
HI RGV250,
Thanks for the reply, your code seems to do what i want but i cannot figure how to modify it i wanted the bottom line to be static
i tried changing the position in the cursor without luck, I also wanted the display to rotate and put an if statement tom jump out of it, instead of looping 16 times

Re: Scroll one line only

Posted: Tue Jan 10, 2023 10:48 pm
by mnfisher
Glad to help..

The text displayed is scrollText (a local variable in main) - the 'abcde' is set in it's definition - I've modified to set in a calculation block. Note that to allow longer strings - untick 'make a local copy' in the display macro and use the length of the string instead of 16 too..

Something like:
Scroll2.fcfx
(11.5 KiB) Downloaded 508 times
Note that the string passed needs to have at least 16 characters as the code stands..

MArtin

Re: Scroll one line only

Posted: Wed Jan 11, 2023 12:26 am
by RGV250
Hi,
I have swapped the lines and added a comment, I am quite new to Flowcode so will need read up a bit on how to break out as I think comparisons only work on strings.
scroll_1A.fcfx
(9.89 KiB) Downloaded 355 times
Bob

Re: Scroll one line only

Posted: Wed Jan 11, 2023 8:58 pm
by ctesla75
Thanks for the help everyone, I have some working code now. No its time to slowly figure out the resr